docker image push (original) (raw)

Description Upload an image to a registry
Usage docker image push [OPTIONS] NAME[:TAG]
AliasesAn alias is a short or memorable alternative for a longer command. docker push

Use docker image push to share your images to theDocker Hubregistry or to a self-hosted one.

Refer to thedocker image tag reference for more information about valid image and tag names.

Killing the docker image push process, for example by pressing CTRL-c while it is running in a terminal, terminates the push operation.

Progress bars are shown during docker push, which show the uncompressed size. The actual amount of data that's pushed will be compressed before sending, so the uploaded size will not be reflected by the progress bar.

Registry credentials are managed bydocker login.

Concurrent uploads

By default the Docker daemon will push five layers of an image at a time. If you are on a low bandwidth connection this may cause timeout issues and you may want to lower this via the --max-concurrent-uploads daemon option. See thedaemon documentation for more details.

Option Default Description
-a, --all-tags Push all tags of an image to the repository
--disable-content-trust true Skip image signing
--platform API 1.46+Push a platform-specific manifest as a single-platform image to the registry.Image index won't be pushed, meaning that other manifests, including attestations won't be preserved.'os[/arch[/variant]]': Explicit platform (eg. linux/amd64)
-q, --quiet Suppress verbose output

Push a new image to a registry

First save the new image by finding the container ID (usingdocker container ls) and then committing it to a new image name. Note that only a-z0-9-_. are allowed when naming images:

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:

Check that this worked by running:

You should see both rhel-httpd and registry-host:5000/myadmin/rhel-httpdlisted.

Push all tags of an image (-a, --all-tags)

Use the -a (or --all-tags) option to push all tags of a local image.

The following example creates multiple tags for an image, and pushes all those tags to Docker Hub.

The image is now tagged under multiple names:

When pushing with the --all-tags option, all tags of the registry-host:5000/myname/myimageimage are pushed: