---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/configure-docker.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/operations/configure-docker.md
  - href: en/sourcecraft/operations/configure-docker.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# Configuring Docker to work with a SourceCraft registry

1. [Create](https://sourcecraft.dev/portal/docs/en/sourcecraft/security/pat.md#create) a personal access token (PAT).
1. If you do not have Docker yet, [install it](https://docs.docker.com/get-started/get-docker/).
1. Run this command:

    ```bash
    echo <personal_access_token>|docker login \
      --username iam \
      --password-stdin \
      pkg.sourcecraft.tech
    ```

    Where:
    * `<personal_access_token>`: Contents of the previously obtained personal access token.
    * `pkg.sourcecraft.tech`: Endpoint that Docker will access when working with the registry. If it not specified, the request will be sent to the default service, [Docker Hub](https://hub.docker.com).

To push your Docker image to a registry, run this command:

```bash
docker push pkg.sourcecraft.tech/cr/<organization_slug>/<registry_ID>/<image_name>:<tag>
```

To pull a Docker image from a registry, run this command:

```bash
docker pull pkg.sourcecraft.tech/cr/<organization_slug>/<registry_ID>/<image_name>:<tag>
```

<!-- source: en/_includes/sourcecraft/get-slug-registry-id-notice.md -->
{% note tip %}

You can find the organization slug and registry ID on the registry page in the SourceCraft UI.

{% endnote %}
<!-- endsource: en/_includes/sourcecraft/get-slug-registry-id-notice.md -->

#### Useful links {#see-also}

* [SourceCraft resource relationships](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/index.md)
* [Creating a registry in SourceCraft](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/packages-management.md)
* [Connecting a registry to a SourceCraft repository](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/connect-registry.md)
* [Configuring Maven to work with a SourceCraft registry](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/configure-maven.md)
* [Configuring npm to work with a SourceCraft registry](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/configure-npm.md)
* [Configuring NuGet to work with a SourceCraft registry](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/configure-nuget.md)
* [Configuring PyPI to work with the SourceCraft registry](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/configure-pypi.md)
