github.com/daaku/docker@v1.5.0/docs/man/docker-push.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-push - Push an image or a repository to the registry
     6  
     7  # SYNOPSIS
     8  **docker push**
     9  [**--help**]
    10  NAME[:TAG]
    11  
    12  # DESCRIPTION
    13  Push an image or a repository to a registry. The default registry is the Docker 
    14  Hub located at [hub.docker.com](https://hub.docker.com/). However the 
    15  image can be pushed to another, perhaps private, registry as demonstrated in 
    16  the example below.
    17  
    18  # OPTIONS
    19  **--help**
    20    Print usage statement
    21  
    22  # EXAMPLES
    23  
    24  # Pushing a new image to a registry
    25  
    26  First save the new image by finding the container ID (using **docker ps**)
    27  and then committing it to a new image name:
    28  
    29      # docker commit c16378f943fe rhel-httpd
    30  
    31  Now push the image to the registry using the image ID. In this example
    32  the registry is on host named registry-host and listening on port 5000.
    33  Default Docker commands will push to the default `hub.docker.com`
    34  registry. Instead, push to the local registry, which is on a host called
    35  registry-host*. To do this, tag the image with the host name or IP
    36  address, and the port of the registry:
    37  
    38      # docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd
    39      # docker push registry-host:5000/myadmin/rhel-httpd
    40  
    41  Check that this worked by running:
    42  
    43      # docker images
    44  
    45  You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd`
    46  listed.
    47  
    48  # HISTORY
    49  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    50  based on docker.com source material and internal work.
    51  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>