Building Docker Images

Hosted on store.docker.com

  1. Create an account at https://hub.docker.com/
    1. Create a repository at https://hub.docker.com/repositories
    2. Link to GitHub
    3. Ensure you select a build rule on a branch, normally master
    4. Dockerfile is required - https://github.com/carlpaton/VulnusCloud/blob/master/Dockerfile
  2. This then builds to https://hub.docker.com/u/carlpaton
  3. 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.

  1. Build your application that will run as a container
  2. Example vodacom messaging xml2sms
  3. Setup the docker environment
  4. Publish the code locally and zip to a compressed file
    1. Copy to the host
    2. Extract the compressed file
  5. Create your Dockerfile
    1. Example Dockerfile
  6. Create a shell script to build the image & spin up the container
    1. Example script

Push To AWS Elastic Container Registry

You can push local images to a remote ECR

References