Note Pushes every local branch to the remote. Be cautious with this in shared repos - you might push experimental branches others don't want. --tags pushes all tags separately.
docker tag <local_image><registry>/<repo>:<tag>docker push <registry>/<repo>:<tag>
Example
docker build -t myapp:1.0.docker tag myapp:1.0 ghcr.io/myorg/myapp:1.0docker tag myapp:1.0 ghcr.io/myorg/myapp:latest
docker push ghcr.io/myorg/myapp:1.0docker push ghcr.io/myorg/myapp:latest
Note Always push a specific version tag alongside latest. This way, deployments can pin to a known version while latest serves as a convenience pointer for development.
Frequently asked questions
How do you push tag?
This task is covered in 2 stacks on this page: Git, Docker. The "Push All Branches" snippet in Git uses `git push --all <remote>`.
Which command does the Git example use?
The "Push All Branches" snippet uses `git push --all <remote>`, from the Remote Repositories section of the Git cheat sheet.
Which stacks cover "push tag" on this page?
Git, Docker. Together they hold 3 copy-ready snippets for this task.
Is there anything to watch out for?
Yes. For "Push All Branches": Pushes every local branch to the remote. Be cautious with this in shared repos - you might push experimental branches others don't want. --tags pushes all tags separately.