liveBook · Manning

Docker tag

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

docker tag is a Docker command that creates or updates a tag referring to a container image.

docker tag creates or updates a tag that refers to an existing container image. Include the registry URL when preparing an image for publication. section 3.9.2

Use the command as follows:

  • docker tag <existing-image> <registry-url>/<image-name>:<version> section 3.9.2
  • Verify the new reference with docker image list; Docker adds a tag without creating another image, so the unique image ID remains the same. section 3.9.2
  • Push the registry-qualified tag with docker push after authentication with docker login. section 3.9.2

Tag an image for a private registry

docker tag video-streaming bmdk1.azurecr.io/video-streaming:1 docker push bmdk1.azurecr.io/video-streaming:1 section 3.9.2

docker tag <existing-image> <registry-url>/<image-name>:<version>

Inspect the canonical command shape before substituting an existing image, registry URL, image name, and version. section 3.9.2

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Explains syntax, registry naming, verification, and shared image identity, but does not cover tag deletion or retagging workflows.
Examples
Demonstrates tagging video-streaming as version 1 for an Azure Container Registry before pushing it.
What it assumes
Assumes an existing Docker image and registry credentials, while showing the required tagging step from the publication workflow.
What you can do after
Apply it via the Docker CLI to name an existing image for registry publication and verify the resulting reference.
How it connects
Connects container images with docker login, docker image list, docker push, and container registries.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.