Docker Image Naming and Tagging
We've touched on tags, but as we work more closely with Docker images, it's probably a good time to look at image tags in more depth. In simple terms, a tag is a label on the Docker image and should provide the user of the image with some useful information about the image or version of the image they are using.
Until now, we've been working with our images as if we're solo developers, but when we start to work with a larger development team, a need arises to think a little harder about how we'll be naming and tagging our images. The following section of the chapter will add to your previous work and allow you to start putting together a naming and tagging strategy for your projects and work.
There are two main methods for naming and tagging your Docker images. You can use the docker tag
command, or you can use the -t
option when you build your image from a Dockerfile
. To use the docker tag
command, you specify the source...