registry
docker push
Uploads a local image or repository to a container registry. The image must be tagged with the registry hostname and repository path before pushing.
docker push [OPTIONS] NAME[:TAG] Common flags
| Flag | Purpose |
|---|---|
| -a, --all-tags | Push all tags of the specified image |
| -q, --quiet | Suppress verbose output |
| --disable-content-trust | Skip signing image (default true) |
Examples
docker push myuser/myapp:1.0 Push tagged image to Docker Hub
docker push ghcr.io/org/api:v2 Push to GitHub Container Registry
docker push -a registry.example.com/team/app Push every tag of the repo
docker tag myapp:latest registry.gitlab.com/g/p/myapp:latest && docker push registry.gitlab.com/g/p/myapp:latest Retag then push to a private registry
Gotcha
You must docker login first for private registries — anonymous push always fails. The image name must include the registry host if it's not Docker Hub.
Related commands
docker pull
Downloads an image or repository from a registry into the local image store. Defaults to Docker Hub and the latest tag when unspecified.
docker tag
Creates a new tag (alias) that refers to an existing image. Tagging is required before pushing to a registry whose hostname is not Docker Hub.
docker build
Builds an image from a Dockerfile and a build context. In Docker 23+ this invokes BuildKit by default and supports multi-platform, secrets, and cache mounts.
docker images
Lists images stored in the local image store with their repository, tag, ID, and size. Alias for docker image ls.
← All Docker commands · Docker vs Kubernetes · Docker vs VMs