Love it or hate it, it’s necessary. When deploying software its essential to keep track of changes.

When deploying to a git, you have several options.

  1. Create a tag with your stable release
  2. Push/Deploy from a stable commit hash
  3. Keep a branch of that release

When it comes to containers things get a little harder to keep track of. This is where tags come in.

If you were to look at the Docker image for nginx it’d be something like

nginx:stable-perl

Here nginx is the image and stable-perl is the tag. Think of tags as a way to keep track of releases.

When we create a Docker image, the tag will default to latest , this also applies when we pull a Docker image without specifying a tag.

If I were to run

docker pull nginx

I would end up with nginx:latest

We can take advantage of this mechanism by passing identifiable information to this tag.

This can be a semantic version, build information etc.

Example:

Let’s say you have a package supercoolpackage hosted on a Azure Container Registry registry.azurecr.io with multiple tags for various python versions