github.com/fabiokung/docker@v0.11.2-0.20170222101415-4534dcd49497/docs/reference/commandline/push.md (about)

     1  ---
     2  title: "push"
     3  description: "The push command description and usage"
     4  keywords: "share, push, image"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/docker Github
     8       repository at https://github.com/docker/docker/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # push
    17  
    18  ```markdown
    19  Usage:  docker push [OPTIONS] NAME[:TAG]
    20  
    21  Push an image or a repository to a registry
    22  
    23  Options:
    24        --disable-content-trust   Skip image signing (default true)
    25        --help                    Print usage
    26  ```
    27  
    28  ## Description
    29  
    30  Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com)
    31  registry or to a self-hosted one.
    32  
    33  Refer to the [`docker tag`](tag.md) reference for more information about valid
    34  image and tag names.
    35  
    36  Killing the `docker push` process, for example by pressing `CTRL-c` while it is
    37  running in a terminal, terminates the push operation.
    38  
    39  Registry credentials are managed by [docker login](login.md).
    40  
    41  ### Concurrent uploads
    42  
    43  By default the Docker daemon will push five layers of an image at a time.
    44  If you are on a low bandwidth connection this may cause timeout issues and you may want to lower
    45  this via the `--max-concurrent-uploads` daemon option. See the
    46  [daemon documentation](dockerd.md) for more details.
    47  
    48  ## Examples
    49  
    50  ### Push a new image to a registry
    51  
    52  First save the new image by finding the container ID (using [`docker ps`](ps.md))
    53  and then committing it to a new image name.  Note that only `a-z0-9-_.` are
    54  allowed when naming images:
    55  
    56  ```bash
    57  $ docker commit c16378f943fe rhel-httpd
    58  ```
    59  
    60  Now, push the image to the registry using the image ID. In this example the
    61  registry is on host named `registry-host` and listening on port `5000`. To do
    62  this, tag the image with the host name or IP address, and the port of the
    63  registry:
    64  
    65  ```bash
    66  $ docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd
    67  
    68  $ docker push registry-host:5000/myadmin/rhel-httpd
    69  ```
    70  
    71  Check that this worked by running:
    72  
    73  ```bash
    74  $ docker images
    75  ```
    76  
    77  You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd`
    78  listed.