Here is how to auto build your Docker Image every time a connected GitHub Repository is updated...
On your Docker Repository:
Click the Repositories tab
Click the Builds tab.
Select the code repository service (GitHub or Bitbucket) where the image’s source code is stored
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
Click Save , done
On your Github or BitBucket Repository:
Put a Dockerfile file defining your build image
Optionally put entrypoint.sh or any other files if you image need those
Commit and Push to Github
From now on, every push to GitHub will automatically build a new Docker image on you Docker hub!
Need more trick on docker ?
See my Udemy course: http://udemy.com/user/akhmaddaniel