github.com/sld880311/docker@v0.0.0-20200524143708-d5593973a475/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 verification (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 Progress bars are shown during docker push, which show the uncompressed size. The 40 actual amount of data that's pushed will be compressed before sending, so the uploaded 41 size will not be reflected by the progress bar. 42 43 Registry credentials are managed by [docker login](login.md). 44 45 ### Concurrent uploads 46 47 By default the Docker daemon will push five layers of an image at a time. 48 If you are on a low bandwidth connection this may cause timeout issues and you may want to lower 49 this via the `--max-concurrent-uploads` daemon option. See the 50 [daemon documentation](dockerd.md) for more details. 51 52 ## Examples 53 54 ### Push a new image to a registry 55 56 First save the new image by finding the container ID (using [`docker ps`](ps.md)) 57 and then committing it to a new image name. Note that only `a-z0-9-_.` are 58 allowed when naming images: 59 60 ```bash 61 $ docker commit c16378f943fe rhel-httpd 62 ``` 63 64 Now, push the image to the registry using the image ID. In this example the 65 registry is on host named `registry-host` and listening on port `5000`. To do 66 this, tag the image with the host name or IP address, and the port of the 67 registry: 68 69 ```bash 70 $ docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd 71 72 $ docker push registry-host:5000/myadmin/rhel-httpd 73 ``` 74 75 Check that this worked by running: 76 77 ```bash 78 $ docker images 79 ``` 80 81 You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd` 82 listed.