Note Common patterns: semver (2.1.0), major.minor (2.1), variant suffix (-alpine, -slim), git-based (main-abc1234, sha-abc1234). Never rely on :latest in production - it is a mutable tag and gives you no way to reproduce a specific build.
Frequently asked questions
How does Docker handle tag image?
Docker covers this with 2 copy-ready snippets on this page. The "Tag an Image" snippet in Docker uses `docker tag <source_image>[:<tag>] <target_image>[:<tag>]`.
Which command does the Docker example use?
The "Tag an Image" snippet uses `docker tag <source_image>[:<tag>] <target_image>[:<tag>]`, from the Images section of the Docker cheat sheet.
What other Docker snippets are shown for "tag image"?
Besides "Tag an Image", this page also shows "Tag Naming Conventions".
Is there anything to watch out for?
Yes. For "Tag an Image": Tagging does not duplicate image layers - it just creates a new reference pointing to the same image ID. You can have many tags for one image.