.TH "DOCKER" "1" "Feb 2021" "Docker Community" "" .nh .ad l .SH NAME .PP docker\-image\-push \- Push an image or a repository to a registry .SH SYNOPSIS .PP \fBdocker image push [OPTIONS] NAME[:TAG]\fP .SH DESCRIPTION .PP Use \fB\fCdocker image push\fR to share your images to the Docker Hub \[la]https://hub.docker.com\[ra] registry or to a self\-hosted one. .PP Refer to \fBdocker\-image\-tag(1)\fP for more information about valid image and tag names. .PP Killing the \fBdocker image push\fP process, for example by pressing \fBCTRL\-c\fP while it is running in a terminal, terminates the push operation. .PP Registry credentials are managed by \fBdocker\-login(1)\fP\&. .SH EXAMPLES .SH Pushing a new image to a registry .PP First save the new image by finding the container ID (using \fBdocker container ls\fP) and then committing it to a new image name. Note that only a\-z0\-9\-\_. are allowed when naming images: .PP .RS .nf # docker container commit c16378f943fe rhel\-httpd .fi .RE .PP Now, push the image to the registry using the image ID. In this example the registry is on host named \fB\fCregistry\-host\fR and listening on port \fB\fC5000\fR\&. To do this, tag the image with the host name or IP address, and the port of the registry: .PP .RS .nf # docker image tag rhel\-httpd registry\-host:5000/myadmin/rhel\-httpd # docker image push registry\-host:5000/myadmin/rhel\-httpd .fi .RE .PP Check that this worked by running: .PP .RS .nf # docker image ls .fi .RE .PP You should see both \fB\fCrhel\-httpd\fR and \fB\fCregistry\-host:5000/myadmin/rhel\-httpd\fR listed. .SH OPTIONS .PP \fB\-\-disable\-content\-trust\fP[=true] Skip image signing .PP \fB\-h\fP, \fB\-\-help\fP[=false] help for push .SH SEE ALSO .PP \fBdocker\-image(1)\fP