0a0dd116 |
% DOCKER(1) Docker User Manuals |
b07f1938 |
% Docker Community
% JUNE 2014 |
0a0dd116 |
# NAME |
b6d55ebc |
docker-push - Push an image or a repository to a registry |
0a0dd116 |
# SYNOPSIS |
b07f1938 |
**docker push** |
a2b529ea |
[**--help**] |
b6d55ebc |
NAME[:TAG] | [REGISTRY_HOST[:REGISTRY_PORT]/]NAME[:TAG] |
0a0dd116 |
# DESCRIPTION |
b6d55ebc |
This command pushes an image or a repository to a registry. If you do not
specify a `REGISTRY_HOST`, the command uses Docker's public registry located at
`registry-1.docker.io` by default. |
0a0dd116 |
|
b07f1938 |
# OPTIONS |
a2b529ea |
**--help**
Print usage statement |
b07f1938 |
# EXAMPLES |
0a0dd116 |
# Pushing a new image to a registry
First save the new image by finding the container ID (using **docker ps**) |
05a86905 |
and then committing it to a new image name. Note that only a-z0-9-_. are
allowed when naming images: |
0a0dd116 |
# docker commit c16378f943fe rhel-httpd
|
b6d55ebc |
Now, push the image to the registry using the image ID. In this example the
registry is on host named `registry-host` and listening on port `5000`. To do
this, tag the image with the host name or IP address, and the port of the
registry: |
0a0dd116 |
# docker tag rhel-httpd registry-host:5000/myadmin/rhel-httpd
# docker push registry-host:5000/myadmin/rhel-httpd
Check that this worked by running:
# docker images
You should see both `rhel-httpd` and `registry-host:5000/myadmin/rhel-httpd` |
1b2b783b |
listed. |
0a0dd116 |
# HISTORY
April 2014, Originally compiled by William Henry (whenry at redhat dot com) |
fa29b1f0 |
based on docker.com source material and internal work. |
f8d9ecfb |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
b6d55ebc |
April 2015, updated by Mary Anthony for v2 <mary@docker.com> |
05a86905 |
June 2015, updated by Sally O'Malley <somalley@redhat.com> |