Posts

Showing posts with the label Docker Hub

Automate pushing multiple Docker tags into DockerHub with hooks/post_push

Image
Sometimes you have a situation where you want to push multiple tags when you push a Docker Image to Docker Hub using the Docker Hub build automation.   We will override the default behavior to do this. Video links related to this blog are available down below. Default behavior The default behavior is to build and push every time  there is a change on master.  That auto-built  image is always tagged with :latest and pushed to the repository as :latest Standard default build on master pushed with tag latest Docker Hub supports overriding its build and deploy behavior with a set of hooks. Custom build files and build hooks are stored in  /hooks  of the code repository.  Hooks are described  https://docs.docker.com/docker-hub/builds/advanced/  .   You can see an example here  https://github.com/freemansoft/cp-server-jolokia Pushing Multiple Tags to Docker Hub This is the approach we will take The following variables are avail...