Docker Community Forums

Share and learn in the Docker community.

Clarify how tags are created


(Iainh) #1

This is a very basic question which however I haven’t been able to answer from the Docker Hub help.
I have several flavours of an image; each represented by a Dockerfile variant in its own directory in a GitHub repo. I gather that a Docker Hub tag is created by setting up an automatic build in Docker Hub from a corresponding tag previously pushed to the GitHub repo.
I can see how to set up the automatic build in Docker Hub but I don’t see what I am tagging in the GitHub repo.

A git tag identifies a particular commit; it’s the whole repo committed so how is a correspondence set up between a particular tag and a Dockerfile in a particular subdirectory?