# How do I push and pull images with Docker?

> Log in to your Phluit container registry at cr.phluit.net with a token, tag and push a Docker image, pull it on a server, and push Helm charts as OCI artifacts.

Source: https://docs.phluit.com/products/container-registry/push-and-pull-images/

Your registry's **Overview** tab shows these commands with your own address, ready to copy.

## 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

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.txt
```

## Push an image

```
docker tag my-app:latest cr.phluit.net/<your-registry>/my-app:latest
docker push cr.phluit.net/<your-registry>/my-app:latest
```

The image then shows on the **Repositories** tab.

## Pull an image

```
docker pull cr.phluit.net/<your-registry>/my-app:latest
docker run -d cr.phluit.net/<your-registry>/my-app:latest
```

## 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

-   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?](/products/container-registry/registry-storage-limit/)
-   Next: [How do I pull images in Kubernetes or push from CI?](/products/container-registry/registry-kubernetes-and-ci/)
