0a0dd116 |
% DOCKER(1) Docker User Manuals |
b07f1938 |
% Docker Community
% JUNE 2014 |
0a0dd116 |
# NAME |
b07f1938 |
docker-tag - Tag an image into a repository |
0a0dd116 |
# SYNOPSIS |
b07f1938 |
**docker tag** |
a2b529ea |
[**--help**] |
b6d55ebc |
IMAGE[:TAG] [REGISTRY_HOST/][USERNAME/]NAME[:TAG] |
0a0dd116 |
# DESCRIPTION |
b6d55ebc |
Assigns a new alias to an image in a registry. An alias refers to the
entire image name including the optional `TAG` after the ':'.
If you do not specify a `REGISTRY_HOST`, the command uses Docker's public
registry located at `registry-1.docker.io` by default. |
0a0dd116 |
# "OPTIONS" |
9c3aafd3 |
**--help**
Print usage statement.
**REGISTRY_HOST** |
1b2b783b |
The hostname of the registry if required. This may also include the port |
0a0dd116 |
separated by a ':'
**USERNAME** |
1b2b783b |
The username or other qualifying identifier for the image. |
0a0dd116 |
**NAME** |
1b2b783b |
The image name. |
0a0dd116 |
**TAG** |
e471a87f |
The tag you are assigning to the image. Though this is arbitrary it is |
1df4049e |
recommended to be used for a version to distinguish images with the same name. |
05a86905 |
Also, for consistency tags should only include a-z0-9-_. . |
e471a87f |
Note that here TAG is a part of the overall name or "tag". |
1b2b783b |
|
0a0dd116 |
# EXAMPLES
|
2858180a |
## Giving an image a new alias |
0a0dd116 |
|
fde10cf8 |
Here is an example of aliasing an image (e.g., 0e5574283393) as "httpd" and |
e471a87f |
tagging it into the "fedora" repository with "version1.0": |
0a0dd116 |
docker tag 0e5574283393 fedora/httpd:version1.0
## Tagging an image for a private repository
|
70ac3802 |
To push an image to a private registry and not the central Docker |
0a0dd116 |
registry you must tag it with the registry hostname and port (if needed).
docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0
# HISTORY |
1b2b783b |
April 2014, Originally compiled by William Henry (whenry at redhat dot com) |
fa29b1f0 |
based on docker.com source material and internal work. |
f8d9ecfb |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
5743cc34 |
July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
b6d55ebc |
April 2015, updated by Mary Anthony for v2 <mary@docker.com> |
05a86905 |
June 2015, updated by Sally O'Malley <somalley@redhat.com> |