docker-image-tag - Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Contents
Description
Assigns a new alias to an image in a registry. An alias refers to the entire image name including the
optional TAG after the ':'.
Examples
Name
docker-image-tag - Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Options
-h, --help[=false] help for tag
See Also
docker-image(1) Docker Community Feb 2025 DOCKER(1)
Synopsis
dockerimagetagSOURCE_IMAGE[:TAG]TARGET_IMAGE[:TAG]
Tagging An Image For A Private Repository
Before pushing an image to a private registry and not the central Docker registry you must tag it with
the registry hostname and port (if needed).
docker image tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0
Tagging An Image Referenced By Id
To tag a local image with ID "0e5574283393" into the "fedora" repository with "version1.0":
docker image tag 0e5574283393 fedora/httpd:version1.0
Tagging An Image Referenced By Name
To tag a local image with name "httpd" into the "fedora" repository with "version1.0":
docker image tag httpd fedora/httpd:version1.0
Note that since the tag name is not specified, the alias is created for an existing local version
httpd:latest.
Tagging An Image Referenced By Name And Tag
To tag a local image with name "httpd" and tag "test" into the "fedora" repository with
"version1.0.test":
docker image tag httpd:test fedora/httpd:version1.0.test
