Skip to content

Dependency proxy for containers runbook

The Dependency Proxy for GitLab Container Registry acts as a local proxy for frequently accessed Docker images from Docker Hub.

Note: For general Package Registry architecture, troubleshooting, and operational procedures, see the main Package Registry runbook.

  • v2/:group_id/dependency_proxy/containers/:image/manifests/*tag
  • v2/:group_id/dependency_proxy/containers/:image/blobs/:sha
  • v2/:group_id/dependency_proxy/containers/:image/blobs/:sha/upload/authorize
  • v2/:group_id/dependency_proxy/containers/:image/blobs/:sha/upload
  • v2/:group_id/dependency_proxy/containers/:image/manifests/*tag/upload/authorize
  • v2/:group_id/dependency_proxy/containers/:image/manifests/*tag/upload

docker pull $GITLAB_HOST:$PORT/$GROUP_PATH/dependency_proxy/containers/library/alpine:latest

Docker Organization Access Token (OAT) for Dependency Proxy

Section titled “Docker Organization Access Token (OAT) for Dependency Proxy”

GitLab’s Dependency Proxy uses a Docker Organization Access Token (OAT) to authenticate pull-through requests to Docker Hub on behalf of users. This token is stored in 1Password as “Docker gitlabci OAT” and is configured as a CI/CD variable (GITLAB_DEPENDENCY_TOKEN) in the gitlab-org and gitlab-com groups.

If this token expires, CI pipelines across both groups will fail with authentication errors when pulling images through the Dependency Proxy.

  • CI jobs fail with errors like Error response from daemon: unauthorized: authentication required or GITLAB_DEPENDENCY_TOKEN fails to authenticate
  • Failures are widespread across multiple projects in gitlab-org and gitlab-com
  • The Dependency Proxy Dashboard shows a spike in errors
  1. Log in to Docker Hub with the GitLab organization credentials (find them in 1Password under the gitlab org vault).

  2. Navigate to Organization Settings → Access Tokens (or use the Docker Hub OAT API).

  3. Create a new Organization Access Token with Public Repo Read-only scope.

  4. Copy the new token value.

  5. Update the CI/CD variable GITLAB_DEPENDENCY_TOKEN in both:

    • https://gitlab.com/gitlab-org → Settings → CI/CD → Variables
    • https://gitlab.com/gitlab-com → Settings → CI/CD → Variables
  6. Update the token value in 1Password under “Docker gitlabci OAT”.

  7. Revoke the old OAT via the Docker Hub UI or API.

  8. Verify by re-running a previously failing pipeline, or by running:

    Note: You must be authenticated to gitlab.com before pulling through the Dependency Proxy. An unauthenticated pull will fail regardless of whether the OAT rotation succeeded.

    Terminal window
    docker login gitlab.com
    docker pull gitlab.com/gitlab-org/dependency_proxy/containers/library/alpine:latest

Automatic rotation via the Docker Hub API is tracked in production-engineering#28867. Until that is implemented, rotation must be done manually following the steps above.

  • Service label: Service::Dependency Proxy
  • Metrics catalog entry: dependency_proxy component in the web service
  • Severity: s3 (does not page SREs directly; alerts roll up to the web service)
  • Feature category: virtual_registry
  • Owner team: group::container registry
  • Slack: #g_container-registry
  • Primary Owner: Container Registry team
  • Slack Channel: #g_container-registry (GitLab internal)
  • Escalation: #production for active incidents