Ad space (banner)
AD

Got the fundamentals? A structured Docker course is a fast way to level up.

Find Docker courses on Udemy

Affiliate link. Costs you nothing extra.

🐳Docker Lessons
Lesson 34 / 45

Tagging an Image with docker tag

When you want to give an image an additional name or version, use docker tag. It adds a new tag pointing at the same image.

The syntax is docker tag source target. No copy is made — both names refer to one image.

Running docker tag myapp myapp:v1 gives the image a version tag alongside latest.

A common stumble is thinking tagging duplicates the image and wastes disk. It doesn't; tags are just labels.

In real work, tags encode versions and environments (v1.2.0, staging), which is what makes rolling back possible.

Docker
Try it (type this into the pseudo terminal)
docker tag myapp myapp:v1

🧑‍💻 You can type this command into the Docker pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)