github.com/vieux/docker@v0.6.3-0.20161004191708-e097c2a938c7/docs/reference/commandline/push.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "push"
     4  description = "The push command description and usage"
     5  keywords = ["share, push, image"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  +++
     9  <![end-metadata]-->
    10  
    11  # push
    12  
    13  ```markdown
    14  Usage:  docker push [OPTIONS] NAME[:TAG]
    15  
    16  Push an image or a repository to a registry
    17  
    18  Options:
    19        --disable-content-trust   Skip image verification (default true)
    20        --help                    Print usage
    21  ```
    22  
    23  Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com)
    24  registry or to a self-hosted one.
    25  
    26  Refer to the [`docker tag`](tag.md) reference for more information about valid
    27  image and tag names.
    28  
    29  Killing the `docker push` process, for example by pressing `CTRL-c` while it is
    30  running in a terminal, terminates the push operation.
    31  
    32  Registry credentials are managed by [docker login](login.md).
    33  
    34  ## Examples
    35  
    36  ### Pushing a new image to a registry
    37  
    38  First save the new image by finding the container ID (using [`docker ps`](ps.md))
    39  and then committing it to a new image name.  Note that only `a-z0-9-_.` are
    40  allowed when naming images:
    41  
    42  ```bash
    43  $ docker commit c16378f943fe rhel-httpd
    44  ```
    45  
    46  Now, push the image to the registry using the image ID. In this example the
    47  registry is on host named `registry-host` and listening on port `5000`. To do
    48  this, tag the image with the host name or IP address, and the port of the
    49  registry:
    50  
    51  ```bash
    52  $ docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd
    53  $ docker push registry-host:5000/myadmin/rhel-httpd
    54  ```
    55  
    56  Check that this worked by running:
    57  
    58  ```bash
    59  $ docker images
    60  ```
    61  
    62  You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd`
    63  listed.