2014-04-16 14:07:55 -04:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-06-30 22:58:04 -04:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 14:07:55 -04:00
|
|
|
# NAME
|
2014-06-30 22:58:04 -04:00
|
|
|
docker-tag - Tag an image into a repository
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-06-30 22:58:04 -04:00
|
|
|
**docker tag**
|
2014-10-15 17:14:12 -04:00
|
|
|
[**--help**]
|
2016-05-11 09:15:50 -04:00
|
|
|
NAME[:TAG] NAME[:TAG]
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
# DESCRIPTION
|
2015-04-01 15:20:59 -04:00
|
|
|
Assigns a new alias to an image in a registry. An alias refers to the
|
|
|
|
entire image name including the optional `TAG` after the ':'.
|
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
# "OPTIONS"
|
2015-09-03 12:15:08 -04:00
|
|
|
**--help**
|
|
|
|
Print usage statement.
|
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
**NAME**
|
2016-05-11 09:15:50 -04:00
|
|
|
The image name which is made up of slash-separated name components,
|
|
|
|
optionally prefixed by a registry hostname. The hostname must comply with
|
|
|
|
standard DNS rules, but may not contain underscores. If a hostname is
|
|
|
|
present, it may optionally be followed by a port number in the format
|
|
|
|
`:8080`. If not present, the command uses Docker's public registry located at
|
|
|
|
`registry-1.docker.io` by default. Name components may contain lowercase
|
|
|
|
characters, digits and separators. A separator is defined as a period, one or
|
|
|
|
two underscores, or one or more dashes. A name component may not start or end
|
|
|
|
with a separator.
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
**TAG**
|
2016-05-11 09:15:50 -04:00
|
|
|
The tag assigned to the image to version and distinguish images with the same
|
|
|
|
name. The tag name may contain lowercase and uppercase characters, digits,
|
|
|
|
underscores, periods and dashes. A tag name may not start with a period or a
|
|
|
|
dash and may contain a maximum of 128 characters.
|
2014-04-17 11:36:58 -04:00
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
# EXAMPLES
|
|
|
|
|
2016-05-11 09:15:50 -04:00
|
|
|
## Tagging an image referenced by ID
|
2014-04-16 14:07:55 -04:00
|
|
|
|
2016-05-11 09:15:50 -04:00
|
|
|
To tag a local image with ID "0e5574283393" into the "fedora" repository with
|
|
|
|
"version1.0":
|
2014-04-16 14:07:55 -04:00
|
|
|
|
|
|
|
docker tag 0e5574283393 fedora/httpd:version1.0
|
|
|
|
|
2016-05-11 09:15:50 -04:00
|
|
|
## Tagging an image referenced by Name
|
|
|
|
|
|
|
|
To tag a local image with name "httpd" into the "fedora" repository with
|
|
|
|
"version1.0":
|
|
|
|
|
|
|
|
docker 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 tag httpd:test fedora/httpd:version1.0.test
|
|
|
|
|
2014-04-16 14:07:55 -04:00
|
|
|
## Tagging an image for a private repository
|
|
|
|
|
2015-08-03 12:51:10 -04:00
|
|
|
To push an image to a private registry and not the central Docker
|
2014-04-16 14:07:55 -04:00
|
|
|
registry you must tag it with the registry hostname and port (if needed).
|
|
|
|
|
|
|
|
docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0
|
|
|
|
|
|
|
|
# HISTORY
|
2014-04-17 11:36:58 -04:00
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-01 20:30:25 -04:00
|
|
|
based on docker.com source material and internal work.
|
2014-07-02 21:07:42 -04:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-07-22 22:40:10 -04:00
|
|
|
July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2015-04-01 15:20:59 -04:00
|
|
|
April 2015, updated by Mary Anthony for v2 <mary@docker.com>
|
2015-07-01 11:15:17 -04:00
|
|
|
June 2015, updated by Sally O'Malley <somalley@redhat.com>
|