github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/man/src/image/tag.md (about)

     1  Assigns a new alias to an image in a registry. An alias refers to the
     2  entire image name including the optional `TAG` after the ':'. 
     3  
     4  # OPTIONS
     5  **NAME**
     6     The image name which is made up of slash-separated name components, 
     7     optionally prefixed by a registry hostname. The hostname must comply with 
     8     standard DNS rules, but may not contain underscores. If a hostname is 
     9     present, it may optionally be followed by a port number in the format 
    10     `:8080`. If not present, the command uses Docker's public registry located at
    11     `registry-1.docker.io` by default. Name components may contain lowercase 
    12     characters, digits and separators. A separator is defined as a period, one or 
    13     two underscores, or one or more dashes. A name component may not start or end 
    14     with a separator.
    15  
    16  **TAG**
    17     The tag assigned to the image to version and distinguish images with the same
    18     name. The tag name may contain lowercase and uppercase characters, digits, 
    19     underscores, periods and dashes. A tag name may not start with a period or a 
    20     dash and may contain a maximum of 128 characters.
    21  
    22  # EXAMPLES
    23  
    24  ## Tagging an image referenced by ID
    25  
    26  To tag a local image with ID "0e5574283393" into the "fedora" repository with 
    27  "version1.0":
    28  
    29      docker image tag 0e5574283393 fedora/httpd:version1.0
    30  
    31  ## Tagging an image referenced by Name
    32  
    33  To tag a local image with name "httpd" into the "fedora" repository with 
    34  "version1.0":
    35  
    36      docker image tag httpd fedora/httpd:version1.0
    37  
    38  Note that since the tag name is not specified, the alias is created for an
    39  existing local version `httpd:latest`.
    40  
    41  ## Tagging an image referenced by Name and Tag
    42  
    43  To tag a local image with name "httpd" and tag "test" into the "fedora"
    44  repository with "version1.0.test":
    45  
    46      docker image tag httpd:test fedora/httpd:version1.0.test
    47  
    48  ## Tagging an image for a private repository
    49  
    50  To push an image to a private registry and not the central Docker
    51  registry you must tag it with the registry hostname and port (if needed).
    52  
    53      docker image tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0