github.com/tompao/docker@v1.9.1/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  [**--help**]
    11  IMAGE[:TAG] [REGISTRY_HOST/][USERNAME/]NAME[:TAG]
    12  
    13  # DESCRIPTION
    14  Assigns a new alias to an image in a registry. An alias refers to the
    15  entire image name including the optional `TAG` after the ':'. 
    16  
    17  If you do not specify a `REGISTRY_HOST`, the command uses Docker's public
    18  registry located at `registry-1.docker.io` by default. 
    19  
    20  # "OPTIONS"
    21  **-f**, **--force**=*true*|*false*
    22     When set to true, force the alias. The default is *false*.
    23  
    24  **--help**
    25     Print usage statement.
    26  
    27  **REGISTRY_HOST**
    28     The hostname of the registry if required. This may also include the port
    29  separated by a ':'
    30  
    31  **USERNAME**
    32     The username or other qualifying identifier for the image.
    33  
    34  **NAME**
    35     The image name.
    36  
    37  **TAG**
    38     The tag you are assigning to the image.  Though this is arbitrary it is
    39  recommended to be used for a version to distinguish images with the same name.
    40  Also, for consistency tags should only include a-z0-9-_. .
    41  Note that here TAG is a part of the overall name or "tag".
    42  
    43  # EXAMPLES
    44  
    45  ## Giving an image a new alias
    46  
    47  Here is an example of aliasing an image (e.g., 0e5574283393) as "httpd" and 
    48  tagging it into the "fedora" repository with "version1.0":
    49  
    50      docker tag 0e5574283393 fedora/httpd:version1.0
    51  
    52  ## Tagging an image for a private repository
    53  
    54  To push an image to a private registry and not the central Docker
    55  registry you must tag it with the registry hostname and port (if needed).
    56  
    57      docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0
    58  
    59  # HISTORY
    60  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    61  based on docker.com source material and internal work.
    62  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    63  July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    64  April 2015, updated by Mary Anthony for v2 <mary@docker.com>
    65  June 2015, updated by Sally O'Malley <somalley@redhat.com>