Hosted on store.docker.com
- Create an account at https://hub.docker.com/
- Create a repository at https://hub.docker.com/repositories
- Link to GitHub
- Ensure you select a build rule on a branch, normally
master
- Dockerfile is required - https://github.com/carlpaton/VulnusCloud/blob/master/Dockerfile
- This then builds to https://hub.docker.com/u/carlpaton
- The image can then be pulled from store.docker.com to build as a local container
1 | docker pull carlpaton/vulnuscloud |
Hosted locally
This will still use official base images but the built image that holds your source code is local.
- Build your application that will run as a container
- Example vodacom messaging xml2sms
- Setup the docker environment
- Publish the code locally and zip to a compressed file
- Copy to the host
- Extract the compressed file
- Create your Dockerfile
- Create a shell script to build the image & spin up the container
Push To AWS Elastic Container Registry
You can push local images to a remote ECR
References
- http://www.ben-morris.com/using-docker-to-build-and-deploy-net-core-console-applications/
- https://docs.microsoft.com/en-us/dotnet/core/docker/docker-basics-dotnet-core
- https://docs.microsoft.com/en-us/dotnet/core/docker/building-net-docker-images
- https://andrewlock.net/optimising-asp-net-core-apps-in-docker-avoiding-manually-copying-csproj-files/
- https://www.youtube.com/watch?v=sl2mfyjnkXk&feature=youtu.be
- https://stackoverflow.com/questions/37387235/asp-net-core-read-environment-variables
- https://docs.docker.com/engine/reference/commandline/run/#parent-command
- https://stackoverflow.com/questions/37387235/asp-net-core-read-environment-variables