github.com/tompao/docker@v1.9.1/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 a registry 6 7 # SYNOPSIS 8 **docker push** 9 [**--help**] 10 NAME[:TAG] | [REGISTRY_HOST[:REGISTRY_PORT]/]NAME[:TAG] 11 12 # DESCRIPTION 13 14 This command pushes an image or a repository to a registry. If you do not 15 specify a `REGISTRY_HOST`, the command uses Docker's public registry located at 16 `registry-1.docker.io` by default. 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. Note that only a-z0-9-_. are 28 allowed when naming images: 29 30 # docker commit c16378f943fe rhel-httpd 31 32 Now, push the image to the registry using the image ID. In this example the 33 registry is on host named `registry-host` and listening on port `5000`. To do 34 this, tag the image with the host name or IP address, and the port of the 35 registry: 36 37 # docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd 38 # docker push registry-host:5000/myadmin/rhel-httpd 39 40 Check that this worked by running: 41 42 # docker images 43 44 You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd` 45 listed. 46 47 # HISTORY 48 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 49 based on docker.com source material and internal work. 50 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> 51 April 2015, updated by Mary Anthony for v2 <mary@docker.com> 52 June 2015, updated by Sally O'Malley <somalley@redhat.com>