Search code examples
dockerdockerfilebuild-automationdockerhub

Docker hub: What is the best approach to handle versioning of third party tools in automatic builds from github?


I have an app on github which uses a third party open source tool as dependency. I want containerize my app so I've added a Dockerfile to my repo that triggers automatic builds on Docker Hub. That Docker image compiles the third party tool and builds my app.

On Docker Hub I've configured the rules to handle the versioning of my app based on new commits (source branch i.,e docker-repo/myapp:latest) and releases (source tags docker-repo/myapp:v1.0). However, I've pointed statically the dockerfile to the latest version of the third part tool. So my app is ready always with the latest version of its dependency.

Now, here is my question: What is the best approach to handle the versions of that third party tool with Docker Hub? I would like to be able to handle the versioning of my app but also handling the versioning of its dependency. Should I created as many dockerfiles as many versions of the dependency I want to build?


Solution

  • I don't think there's a best practice for this. Some languages create a version out of every version of the upstream tools; e. g. Python which has a tag for ever version of Alpine and Debian. So it's not a matter of should I, it's simply you might want to do or not depending on the clients of your image. In all likelihood, you might want to simply provide a latest image mapped to the latest image of your upstream dependency.