How do I push and pull images with Docker?
Your registry’s Overview tab shows these commands with your own address, ready to copy.
Image addresses
Section titled “Image addresses”An image in your registry is addressed as:
cr.phluit.net/<your-registry>/<image>:<tag>
For example cr.phluit.net/acme-apps/app:1.4. Repositories are created the first time you push to them.
Log in
Section titled “Log in”Use a token from the Access tokens tab: read/write to push, read-only is enough to pull.
docker login cr.phluit.net -u 'robot$<your-registry>+<token-name>'Paste the token when Docker asks for the password. Put the user name in single quotes: it contains a $, which the shell would otherwise change.
On a server or in a script, read the token from a file instead of typing it:
docker login cr.phluit.net -u 'robot$<your-registry>+<token-name>' --password-stdin < token.txtPush an image
Section titled “Push an image”docker tag my-app:latest cr.phluit.net/<your-registry>/my-app:latestdocker push cr.phluit.net/<your-registry>/my-app:latestThe image then shows on the Repositories tab.
Pull an image
Section titled “Pull an image”docker pull cr.phluit.net/<your-registry>/my-app:latestdocker run -d cr.phluit.net/<your-registry>/my-app:latestHelm charts and other OCI artifacts
Section titled “Helm charts and other OCI artifacts”Helm charts are OCI artifacts too, so they can live in the same registry:
helm push chart-1.0.0.tgz oci://cr.phluit.net/<your-registry>Good to know
Section titled “Good to know”- It’s a standard registry: Podman and other OCI tools work the same way.
- Images travel over HTTPS only.
- A login or permission error usually means a wrong or deleted token, or a read-only token used to push.
- A refused push can also mean the registry is full. See What happens when my registry storage is full?
- Next: How do I pull images in Kubernetes or push from CI?
Was this helpful?
Thank you. If something is missing, tell us.
