github.com/stchris/docker@v1.4.2-0.20150106053530-1510a324dbd5/docs/man/docker-tag.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-tag - Tag an image into a repository 6 7 # SYNOPSIS 8 **docker tag** 9 [**-f**|**--force**[=*false*]] 10 IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG] 11 12 # DESCRIPTION 13 This will give a new alias to an image in the repository. This refers to the 14 entire image name including the optional TAG after the ':'. 15 16 # "OPTIONS" 17 **-f**, **--force**=*true*|*false* 18 When set to true, force the alias. The default is *false*. 19 20 **REGISTRYHOST** 21 The hostname of the registry if required. This may also include the port 22 separated by a ':' 23 24 **USERNAME** 25 The username or other qualifying identifier for the image. 26 27 **NAME** 28 The image name. 29 30 **TAG** 31 The tag you are assigning to the image. Though this is arbitrary it is 32 recommended to be used for a version to distinguish images with the same name. 33 Note that here TAG is a part of the overall name or "tag". 34 35 # OPTIONS 36 **-f**, **--force**=*true*|*false* 37 Force. The default is *false*. 38 39 # EXAMPLES 40 41 ## Giving an image a new alias 42 43 Here is an example of aliasing an image (e.g., 0e5574283393) as "httpd" and 44 tagging it into the "fedora" repository with "version1.0": 45 46 docker tag 0e5574283393 fedora/httpd:version1.0 47 48 ## Tagging an image for a private repository 49 50 To push an image to an private registry and not the central Docker 51 registry you must tag it with the registry hostname and port (if needed). 52 53 docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0 54 55 # HISTORY 56 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 57 based on docker.com source material and internal work. 58 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> 59 July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>