Docker Auto Build

Every GitHub or BitBucket Repository Push

vITraining Admin

Here is how to auto build your Docker Image every time a connected GitHub Repository is updated...


On your Docker Repository:

  1. Click the Repositories tab

  2. Click the Builds tab.

  3. Select the code repository service (GitHub or Bitbucket) where the image’s source code is stored

  4. Review the default Build Rules, make sure the tags are correct, the image version, the location of Dockerfile on your repository and the context path the image builder will start at

  5. Click Save , done

On your Github or BitBucket Repository:

  1. Put a Dockerfile file defining your build image

  2. Optionally put entrypoint.sh or any other files if you image need those

  3. Commit and Push to Github

From now on, every push to GitHub will automatically build a new Docker image on you Docker hub!

Enjoy!

Need more trick on docker ? 

See my Udemy course: http://udemy.com/user/akhmaddaniel