---
name: "registry-v2-distribution-mirror"
description: "Deploy private Docker Registry V2 with pull-through caching for Docker Hub rate limits."
metadata:
  author: "Distribution"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "setup docker pull through cache"
  - "configure distribution registry"
  - "run registry garbage collect"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Distribution Registry V2 & Pull-Through Caching

Deploys CNCF Distribution (Registry V2): configuring pull-through cache mirrors for Docker Hub, S3/Azure storage drivers, htpasswd authentication, TLS termination, and registry garbage collection.

## When to Invoke
Invoke this skill whenever you need to:
- setup docker pull through cache
- configure distribution registry
- run registry garbage collect

## Execution SOP & Rules
1. Deploy registry container with proxy.remoteurl: https://registry-1.docker.io configuration.
2. Configure daemon.json on client machines: registry-mirrors: ['https://mirror.internal.lan:5000'].
3. Set storage credentials under storage.s3 in config.yml.
4. Run garbage collection: registry garbage-collect /etc/docker/registry/config.yml.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
