github.com/docker/docker-ce@v17.12.1-ce-rc2+incompatible/components/cli/man/src/image/push.md (about) 1 Use `docker image push` to share your images to the [Docker Hub](https://hub.docker.com) 2 registry or to a self-hosted one. 3 4 Refer to **docker-image-tag(1)** for more information about valid image and tag names. 5 6 Killing the **docker image push** process, for example by pressing **CTRL-c** while it 7 is running in a terminal, terminates the push operation. 8 9 Registry credentials are managed by **docker-login(1)**. 10 11 # EXAMPLES 12 13 ## Pushing a new image to a registry 14 15 First save the new image by finding the container ID (using **docker container ls**) 16 and then committing it to a new image name. Note that only a-z0-9-_. are 17 allowed when naming images: 18 19 # docker container commit c16378f943fe rhel-httpd 20 21 Now, push the image to the registry using the image ID. In this example the 22 registry is on host named `registry-host` and listening on port `5000`. To do 23 this, tag the image with the host name or IP address, and the port of the 24 registry: 25 26 # docker image tag rhel-httpd registry-host:5000/myadmin/rhel-httpd 27 # docker image push registry-host:5000/myadmin/rhel-httpd 28 29 Check that this worked by running: 30 31 # docker image ls 32 33 You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd` 34 listed.