Configuring Docker to work with a SourceCraft registry

  1. Create a personal access token (PAT).

  2. If you do not have Docker yet, install it.

  3. Run this command:

    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.

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

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

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

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

Tip

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

Useful links