Building Docker Images

Hosted on store.docker.com

A summary of the steps is:

  1. Create an account at cloud.docker.com
    1. Create a repository
  2. Link to GITHub, auto build on check in
    1. Example vodacom messaging xml2sms source code
    2. Example Dockerfile
  3. This then build to hub.docker.com/u/carlpaton/
  4. The image can then be pulled from store.docker.com with
docker pull carlpaton/vodacommessagingxml2sms
  1. Build the container
    1. Example script

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
    1. Example vodacom messaging xml2sms
  2. Setup the docker environment
  3. Publish the code locally and zip to a compressed file
    1. Copy to the host
    2. Extract the compressed file
  4. Create your Dockerfile
    1. Example Dockerfile
  5. Create a shell script to build the image & spin up the container
    1. Example script

References

 

Leave a Reply