wiki:docker-tagging
Table of Contents
Docker Tagging
Tags identify image versions. An image name is <registry>/<repository>:<tag>; the latest tag is the default. Retag an image with docker tag to give it multiple names (e.g., myapp:1.0 and myapp:latest both point to the same layers). Tags are just pointers, not versions—retagging the same tag name overwrites it.
$ docker tag myapp:v1 myapp:latest # create an alias for the same image $ docker tag myapp:v1 myregistry.com/myapp # tag for pushing to a registry $ docker images # see all tags $ docker rmi myapp:v1 # remove a specific tag
Pushing with a tag sends all the layers that tag points to. An image can have multiple tags simultaneously—removing one tag doesn't delete the image or other tags unless it's the last one. Use tags for versioning (e.g., 1.0, 1.1, latest) or release channels (e.g., stable, beta). Tags without a registry hostname default to Docker Hub.
wiki/docker-tagging.md · Last modified: by 127.0.0.1
