[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73C2GY1ZQH2M04NF973GPQP":3,"skill-same:01M73C2GY1ZQH2M04NF973GPQP":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M73C2GY1ZQH2M04NF973GPQP","setup-container-registry",null,"Configure container image registries including GitHub Container Registry (ghcr.io), Docker Hub, and Harbor with automated image scanning, tagging strategies, retention policies, and CI\u002FCD integration for secure image distribution. Use when setting up a private container registry, migrating from Docker Hub to self-hosted registries, implementing vulnerability scanning in CI\u002FCD pipelines, managing multi-architecture images, enforcing image signing, or configuring automatic cleanup and retention policies.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsetup-container-registry\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: setup-container-registry\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\ndescription: >\n  Configure container image registries including GitHub Container Registry (ghcr.io),\n  Docker Hub, and Harbor with automated image scanning, tagging strategies, retention\n  policies, and CI\u002FCD integration for secure image distribution. Use when setting up a\n  private container registry, migrating from Docker Hub to self-hosted registries,\n  implementing vulnerability scanning in CI\u002FCD pipelines, managing multi-architecture\n  images, enforcing image signing, or configuring automatic cleanup and retention policies.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: devops\n  complexity: basic\n  language: multi\n  tags: container-registry, docker-hub, ghcr, harbor, vulnerability-scanning\n---\n\n# Setup Container Registry\n\nConfigure production-ready container registries with security scanning, access control, and automated CI\u002FCD integration.\n\n## When to Use\n\n- Setting up private container registry for organization\n- Migrating from Docker Hub to self-hosted or alternative registries\n- Implementing image vulnerability scanning in CI\u002FCD pipelines\n- Managing multi-architecture images (amd64, arm64) with manifests\n- Enforcing image signing and provenance verification\n- Configuring automatic image cleanup and retention policies\n\n## Inputs\n\n- **Required**: Docker or Podman installed locally\n- **Required**: Registry credentials (personal access tokens, service accounts)\n- **Optional**: Self-hosted infrastructure for Harbor deployment\n- **Optional**: Kubernetes cluster for registry integration\n- **Optional**: Cosign\u002FNotary for image signing\n- **Optional**: Trivy or Clair for vulnerability scanning\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n\n### Step 1: Configure GitHub Container Registry (ghcr.io)\n\nSet up GitHub Container Registry with personal access tokens and CI\u002FCD integration.\n\n```bash\n# Create GitHub Personal Access Token\n# Go to: Settings → Developer settings → Personal access tokens → Tokens (classic)\n# Required scopes: write:packages, read:packages, delete:packages\n\n# Login to ghcr.io\necho $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin\n\n# Verify login\ndocker info | grep -A 5 \"Registry:\"\n\n# Tag image for ghcr.io\ndocker tag myapp:latest ghcr.io\u002FUSERNAME\u002Fmyapp:latest\ndocker tag myapp:latest ghcr.io\u002FUSERNAME\u002Fmyapp:v1.0.0\n\n# Push image\ndocker push ghcr.io\u002FUSERNAME\u002Fmyapp:latest\ndocker push ghcr.io\u002FUSERNAME\u002Fmyapp:v1.0.0\n\n# Configure in GitHub Actions\ncat > .github\u002Fworkflows\u002Fdocker-build.yml \u003C\u003C'EOF'\nname: Build and Push Docker Image\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\n\non:\n  push:\n    branches: [main]\n    tags: ['v*']\n\nenv:\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  build-and-push:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      packages: write\n\n    steps:\n      - name: Checkout code\n        uses: actions\u002Fcheckout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v3\n\n      - name: Log in to GitHub Container Registry\n        uses: docker\u002Flogin-action@v3\n        with:\n          registry: ${{ env.REGISTRY }}\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Extract metadata\n        id: meta\n        uses: docker\u002Fmetadata-action@v5\n        with:\n          images: ${{ env.REGISTRY }}\u002F${{ env.IMAGE_NAME }}\n          tags: |\n            type=ref,event=branch\n            type=ref,event=pr\n            type=semver,pattern={{version}}\n            type=semver,pattern={{major}}.{{minor}}\n            type=sha,prefix={{branch}}-\n\n      - name: Build and push\n        uses: docker\u002Fbuild-push-action@v5\n        with:\n          context: .\n          platforms: linux\u002Famd64,linux\u002Farm64\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}\n          cache-from: type=gha\n          cache-to: type=gha,mode=max\nEOF\n\n# Make package public (default is private)\n# Go to: github.com\u002FUSERNAME?tab=packages → Select package → Package settings → Change visibility\n\n# Pull image (public packages don't require authentication)\ndocker pull ghcr.io\u002FUSERNAME\u002Fmyapp:latest\n```\n\n**Expected:** GitHub token has package permissions. Docker login succeeds. Images push to ghcr.io with proper tagging. GitHub Actions workflow builds multi-architecture images with automated tagging. Package visibility configured correctly.\n\n**On failure:** For authentication errors, verify token has `write:packages` scope and hasn't expired. For push failures, check repository name matches image name (case-sensitive). For workflow failures, verify `permissions: packages: write` is set. For public packages not accessible, wait up to 10 minutes for visibility change to propagate.\n\n### Step 2: Configure Docker Hub with Automated Builds\n\nSet up Docker Hub repository with access tokens and vulnerability scanning.\n\n```bash\n# Create Docker Hub access token\n# Go to: hub.docker.com → Account Settings → Security → New Access Token\n\n# Login to Docker Hub\necho $DOCKERHUB_TOKEN | docker login -u USERNAME --password-stdin\n\n# Create repository\n# Go to: hub.docker.com → Repositories → Create Repository\n# Select: public or private, enable vulnerability scanning (Pro\u002FTeam plan)\n\n# Tag for Docker Hub\ndocker tag myapp:latest USERNAME\u002Fmyapp:latest\ndocker tag myapp:latest USERNAME\u002Fmyapp:v1.0.0\n\n# Push to Docker Hub\ndocker push USERNAME\u002Fmyapp:latest\ndocker push USERNAME\u002Fmyapp:v1.0.0\n\n# Configure automated builds (legacy feature, deprecated)\n# Modern approach: Use GitHub Actions with Docker Hub\n\ncat > .github\u002Fworkflows\u002Fdockerhub.yml \u003C\u003C'EOF'\nname: Docker Hub Push\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\n\non:\n  push:\n    branches: [main]\n    tags: ['v*']\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Set up QEMU\n        uses: docker\u002Fsetup-qemu-action@v3\n\n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker\u002Flogin-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Build and push\n        uses: docker\u002Fbuild-push-action@v5\n        with:\n          context: .\n          platforms: linux\u002Famd64,linux\u002Farm64,linux\u002Farm\u002Fv7\n          push: true\n          tags: |\n            ${{ secrets.DOCKERHUB_USERNAME }}\u002Fmyapp:latest\n            ${{ secrets.DOCKERHUB_USERNAME }}\u002Fmyapp:${{ github.ref_name }}\n          build-args: |\n            BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')\n            VCS_REF=${{ github.sha }}\n\n      - name: Update Docker Hub description\n        uses: peter-evans\u002Fdockerhub-description@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n          repository: ${{ secrets.DOCKERHUB_USERNAME }}\u002Fmyapp\n          readme-filepath: .\u002FREADME.md\nEOF\n\n# View vulnerability scan results\n# Go to: hub.docker.com → Repository → Tags → View scan results\n\n# Configure webhook for automated triggers\n# Go to: Repository → Webhooks → Add webhook\nWEBHOOK_URL=\"https:\u002F\u002Fexample.com\u002Fwebhook\"\ncurl -X POST https:\u002F\u002Fhub.docker.com\u002Fapi\u002Fcontent\u002Fv1\u002Frepositories\u002FUSERNAME\u002Fmyapp\u002Fwebhooks \\\n  -H \"Authorization: Bearer $DOCKERHUB_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"name\\\":\\\"CI Trigger\\\",\\\"webhook_url\\\":\\\"$WEBHOOK_URL\\\"}\"\n```\n\n**Expected:** Docker Hub access token created with read\u002Fwrite permissions. Images push successfully with multi-architecture support. Vulnerability scans run automatically (if enabled). README syncs from GitHub. Webhooks trigger on image push.\n\n**On failure:** For rate limit errors, upgrade to Pro plan or implement pull-through cache. For scan failures, verify plan includes scanning (not available on free tier). For multi-arch build failures, ensure QEMU installed with `docker run --privileged --rm tonistiigi\u002Fbinfmt --install all`. For webhook failures, verify endpoint is publicly accessible and returns 200 OK.\n\n### Step 3: Deploy Harbor Self-Hosted Registry\n\nInstall Harbor with Helm for enterprise registry with RBAC and replication.\n\n```bash\n# Add Harbor Helm repository\nhelm repo add harbor https:\u002F\u002Fhelm.gopharbor.io\nhelm repo update\n\n# Create namespace\nkubectl create namespace harbor\n\n# Create values file\ncat > harbor-values.yaml \u003C\u003CEOF\nexpose:\n  type: ingress\n  tls:\n    enabled: true\n    certSource: secret\n    secret:\n      secretName: harbor-tls\n  ingress:\n    hosts:\n      core: harbor.example.com\n    className: nginx\n    annotations:\n      cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\n\nexternalURL: https:\u002F\u002Fharbor.example.com\n\npersistence:\n  enabled: true\n  persistentVolumeClaim:\n    registry:\n      size: 200Gi\n      storageClass: gp3\n    database:\n      size: 10Gi\n      storageClass: gp3\n\nharborAdminPassword: \"ChangeMe123!\"\n\ndatabase:\n  type: internal  # Use external: postgres for production\n\nredis:\n  type: internal  # Use external: redis for production\n\ntrivy:\n  enabled: true\n  skipUpdate: false\n\nnotary:\n  enabled: true  # Image signing\n\nchartmuseum:\n  enabled: true  # Helm chart storage\nEOF\n\n# Install Harbor\nhelm install harbor harbor\u002Fharbor \\\n  --namespace harbor \\\n  --values harbor-values.yaml \\\n  --timeout 10m\n\n# Wait for pods to be ready\nkubectl get pods -n harbor -w\n\n# Get admin password\nkubectl get secret -n harbor harbor-core -o jsonpath='{.data.HARBOR_ADMIN_PASSWORD}' | base64 -d\n\n# Access Harbor UI\necho \"Harbor UI: https:\u002F\u002Fharbor.example.com\"\necho \"Username: admin\"\n\n# Login via Docker CLI\ndocker login harbor.example.com\n# Username: admin\n# Password: (from above)\n\n# Create project via API\ncurl -u \"admin:$HARBOR_PASSWORD\" -X POST \\\n  https:\u002F\u002Fharbor.example.com\u002Fapi\u002Fv2.0\u002Fprojects \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"project_name\": \"myapp\",\n    \"public\": false,\n    \"metadata\": {\n      \"auto_scan\": \"true\",\n      \"severity\": \"high\",\n      \"enable_content_trust\": \"true\"\n    }\n  }'\n\n# Tag and push to Harbor\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:latest\ndocker push harbor.example.com\u002Fmyapp\u002Fapp:latest\n\n# Configure robot account for CI\u002FCD\n# UI: Administration → Robot Accounts → New Robot Account\n# Permissions: Pull, Push to specific projects\n\n# Use robot account in CI\u002FCD\ndocker login harbor.example.com -u 'robot$myapp-ci' -p \"$ROBOT_TOKEN\"\n```\n\n**Expected:** Harbor deploys to Kubernetes with PostgreSQL and Redis. Ingress configured with TLS. Admin UI accessible. Projects created with vulnerability scanning enabled. Robot accounts provide CI\u002FCD authentication. Trivy scans images on push.\n\n**On failure:** For database connection errors, check PostgreSQL pod logs with `kubectl logs -n harbor harbor-database-0`. For Ingress issues, verify DNS points to LoadBalancer and cert-manager issued certificate. For Trivy failures, check if vulnerability database downloaded successfully. For storage issues, verify PVCs bound with `kubectl get pvc -n harbor`.\n\n### Step 4: Implement Image Tagging Strategy and Retention Policies\n\nConfigure semantic versioning, immutable tags, and automatic cleanup.\n\n```bash\n# Tagging best practices\n# 1. Semantic versioning\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:v1.2.3\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:v1.2\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:v1\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:latest\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Expected:** Images tagged with semantic versions, commit SHAs, and environment labels. Retention policies automatically clean old images based on age, pull activity, or count limits. Production tags (v* pattern) retained longer than development branches. Untagged images deleted to save storage.\n\n**On failure:** For retention not triggering, verify cron schedule syntax and Harbor timezone settings. For accidental deletion of production images, implement immutable tags with Harbor tag immutability rules. For storage still growing, check artifact retention includes Helm charts and other OCI artifacts. For policy conflicts, ensure retention rules use `or` algorithm and don't contradict each other.\n\n### Step 5: Configure Kubernetes Image Pull Secrets\n\nSet up registry authentication for Kubernetes clusters.\n\n```bash\n# Create Docker registry secret\nkubectl create secret docker-registry ghcr-secret \\\n  --docker-server=ghcr.io \\\n  --docker-username=USERNAME \\\n  --docker-password=$GITHUB_TOKEN \\\n  --docker-email=user@example.com \\\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Expected:** Image pull secrets created in target namespaces. Pods successfully pull images from private registries. Service accounts include imagePullSecrets. No ImagePullBackOff errors.\n\n**On failure:** For authentication errors, verify credentials with `docker login` manually. For secret not found, check namespace matches Pod namespace. For still failing, decode secret and verify JSON structure with `kubectl get secret ghcr-secret -o jsonpath='{.data.\\.dockerconfigjson}' | base64 -d | jq`. For token expiration, rotate credentials and update secrets.\n\n### Step 6: Enable Vulnerability Scanning and Image Signing\n\nIntegrate Trivy scanning and Cosign for image provenance.\n\n```bash\n# Install Trivy CLI\nwget https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy\u002Freleases\u002Flatest\u002Fdownload\u002Ftrivy_0.47.0_Linux-64bit.tar.gz\ntar zxvf trivy_0.47.0_Linux-64bit.tar.gz\nsudo mv trivy \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# Scan local image\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Expected:** Trivy scans detect vulnerabilities with severity ratings. SARIF results upload to GitHub Security tab. Critical vulnerabilities fail CI\u002FCD builds. Cosign signs images with keypair or keyless (Fulcio). Verification succeeds for signed images. Kyverno blocks unsigned images in Kubernetes.\n\n**On failure:** For Trivy database download failures, run `trivy image --download-db-only`. For false positives, create `.trivyignore` file with CVE IDs and justifications. For Cosign signature failures, verify image digest hasn't changed (signatures apply to specific digest, not tags). For Kyverno policy failures, check image reference pattern matches actual image names. For keyless signing, verify OIDC token has sufficient permissions.\n\n## Validation\n\n- [ ] Registry accessible via Docker CLI login\n- [ ] Images push and pull successfully with proper authentication\n- [ ] Multi-architecture images build and manifest created\n- [ ] Vulnerability scanning runs automatically on image push\n- [ ] Retention policies clean old images on schedule\n- [ ] Kubernetes clusters can pull images via imagePullSecrets\n- [ ] Image signatures verified before deployment\n- [ ] Webhook notifications trigger on image updates\n- [ ] Registry UI shows scan results and artifact metadata\n\n## Common Pitfalls\n\n- **Public images by default**: GitHub packages are private by default, Docker Hub public. Verify visibility settings match security requirements.\n\n- **Token expiration**: Personal access tokens expire, breaking CI\u002FCD. Use non-expiring tokens for automation or implement rotation.\n\n- **Untagged image accumulation**: Build process creates untagged images consuming storage. Enable automatic cleanup of untagged artifacts.\n\n- **Missing multi-arch support**: Builds only amd64, fails on ARM instances. Use `docker buildx` with `--platform` flag for cross-platform builds.\n\n- **No rate limit protection**: Free Docker Hub accounts limited to 100 pulls\u002F6h. Implement pull-through cache or upgrade plan.\n\n- **Mutable tags**: `latest` tag overwritten breaks reproducibility. Use immutable tags (commit SHA, semantic version) for production.\n\n- **Insecure registry communication**: Self-hosted registry without TLS. Always use HTTPS with valid certificates.\n\n- **No access control**: Single credential shared across teams. Implement RBAC with project-specific robot accounts.\n\n## Related Skills\n\n- `create-r-dockerfile` - Building container images for registry\n- `optimize-docker-build-cache` - Efficient image builds for registry push\n- `build-ci-cd-pipeline` - Automated registry push in CI\u002FCD\n- `deploy-to-kubernetes` - Pulling images from registry\n- `implement-gitops-workflow` - Image promotion between registries\n","# Setup Container Registry\n\nConfigure production-ready container registries with security scanning, access control, and automated CI\u002FCD integration.\n\n## When to Use\n\n- Setting up private container registry for organization\n- Migrating from Docker Hub to self-hosted or alternative registries\n- Implementing image vulnerability scanning in CI\u002FCD pipelines\n- Managing multi-architecture images (amd64, arm64) with manifests\n- Enforcing image signing and provenance verification\n- Configuring automatic image cleanup and retention policies\n\n## Inputs\n\n- **Required**: Docker or Podman installed locally\n- **Required**: Registry credentials (personal access tokens, service accounts)\n- **Optional**: Self-hosted infrastructure for Harbor deployment\n- **Optional**: Kubernetes cluster for registry integration\n- **Optional**: Cosign\u002FNotary for image signing\n- **Optional**: Trivy or Clair for vulnerability scanning\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n\n### Step 1: Configure GitHub Container Registry (ghcr.io)\n\nSet up GitHub Container Registry with personal access tokens and CI\u002FCD integration.\n\n```bash\n# Create GitHub Personal Access Token\n# Go to: Settings → Developer settings → Personal access tokens → Tokens (classic)\n# Required scopes: write:packages, read:packages, delete:packages\n\n# Login to ghcr.io\necho $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin\n\n# Verify login\ndocker info | grep -A 5 \"Registry:\"\n\n# Tag image for ghcr.io\ndocker tag myapp:latest ghcr.io\u002FUSERNAME\u002Fmyapp:latest\ndocker tag myapp:latest ghcr.io\u002FUSERNAME\u002Fmyapp:v1.0.0\n\n# Push image\ndocker push ghcr.io\u002FUSERNAME\u002Fmyapp:latest\ndocker push ghcr.io\u002FUSERNAME\u002Fmyapp:v1.0.0\n\n# Configure in GitHub Actions\ncat > .github\u002Fworkflows\u002Fdocker-build.yml \u003C\u003C'EOF'\nname: Build and Push Docker Image\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\n\non:\n  push:\n    branches: [main]\n    tags: ['v*']\n\nenv:\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  build-and-push:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      packages: write\n\n    steps:\n      - name: Checkout code\n        uses: actions\u002Fcheckout@v4\n\n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v3\n\n      - name: Log in to GitHub Container Registry\n        uses: docker\u002Flogin-action@v3\n        with:\n          registry: ${{ env.REGISTRY }}\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Extract metadata\n        id: meta\n        uses: docker\u002Fmetadata-action@v5\n        with:\n          images: ${{ env.REGISTRY }}\u002F${{ env.IMAGE_NAME }}\n          tags: |\n            type=ref,event=branch\n            type=ref,event=pr\n            type=semver,pattern={{version}}\n            type=semver,pattern={{major}}.{{minor}}\n            type=sha,prefix={{branch}}-\n\n      - name: Build and push\n        uses: docker\u002Fbuild-push-action@v5\n        with:\n          context: .\n          platforms: linux\u002Famd64,linux\u002Farm64\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}\n          cache-from: type=gha\n          cache-to: type=gha,mode=max\nEOF\n\n# Make package public (default is private)\n# Go to: github.com\u002FUSERNAME?tab=packages → Select package → Package settings → Change visibility\n\n# Pull image (public packages don't require authentication)\ndocker pull ghcr.io\u002FUSERNAME\u002Fmyapp:latest\n```\n\n**Expected:** GitHub token has package permissions. Docker login succeeds. Images push to ghcr.io with proper tagging. GitHub Actions workflow builds multi-architecture images with automated tagging. Package visibility configured correctly.\n\n**On failure:** For authentication errors, verify token has `write:packages` scope and hasn't expired. For push failures, check repository name matches image name (case-sensitive). For workflow failures, verify `permissions: packages: write` is set. For public packages not accessible, wait up to 10 minutes for visibility change to propagate.\n\n### Step 2: Configure Docker Hub with Automated Builds\n\nSet up Docker Hub repository with access tokens and vulnerability scanning.\n\n```bash\n# Create Docker Hub access token\n# Go to: hub.docker.com → Account Settings → Security → New Access Token\n\n# Login to Docker Hub\necho $DOCKERHUB_TOKEN | docker login -u USERNAME --password-stdin\n\n# Create repository\n# Go to: hub.docker.com → Repositories → Create Repository\n# Select: public or private, enable vulnerability scanning (Pro\u002FTeam plan)\n\n# Tag for Docker Hub\ndocker tag myapp:latest USERNAME\u002Fmyapp:latest\ndocker tag myapp:latest USERNAME\u002Fmyapp:v1.0.0\n\n# Push to Docker Hub\ndocker push USERNAME\u002Fmyapp:latest\ndocker push USERNAME\u002Fmyapp:v1.0.0\n\n# Configure automated builds (legacy feature, deprecated)\n# Modern approach: Use GitHub Actions with Docker Hub\n\ncat > .github\u002Fworkflows\u002Fdockerhub.yml \u003C\u003C'EOF'\nname: Docker Hub Push\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\n\non:\n  push:\n    branches: [main]\n    tags: ['v*']\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Set up QEMU\n        uses: docker\u002Fsetup-qemu-action@v3\n\n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v3\n\n      - name: Login to Docker Hub\n        uses: docker\u002Flogin-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Build and push\n        uses: docker\u002Fbuild-push-action@v5\n        with:\n          context: .\n          platforms: linux\u002Famd64,linux\u002Farm64,linux\u002Farm\u002Fv7\n          push: true\n          tags: |\n            ${{ secrets.DOCKERHUB_USERNAME }}\u002Fmyapp:latest\n            ${{ secrets.DOCKERHUB_USERNAME }}\u002Fmyapp:${{ github.ref_name }}\n          build-args: |\n            BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')\n            VCS_REF=${{ github.sha }}\n\n      - name: Update Docker Hub description\n        uses: peter-evans\u002Fdockerhub-description@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n          repository: ${{ secrets.DOCKERHUB_USERNAME }}\u002Fmyapp\n          readme-filepath: .\u002FREADME.md\nEOF\n\n# View vulnerability scan results\n# Go to: hub.docker.com → Repository → Tags → View scan results\n\n# Configure webhook for automated triggers\n# Go to: Repository → Webhooks → Add webhook\nWEBHOOK_URL=\"https:\u002F\u002Fexample.com\u002Fwebhook\"\ncurl -X POST https:\u002F\u002Fhub.docker.com\u002Fapi\u002Fcontent\u002Fv1\u002Frepositories\u002FUSERNAME\u002Fmyapp\u002Fwebhooks \\\n  -H \"Authorization: Bearer $DOCKERHUB_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"name\\\":\\\"CI Trigger\\\",\\\"webhook_url\\\":\\\"$WEBHOOK_URL\\\"}\"\n```\n\n**Expected:** Docker Hub access token created with read\u002Fwrite permissions. Images push successfully with multi-architecture support. Vulnerability scans run automatically (if enabled). README syncs from GitHub. Webhooks trigger on image push.\n\n**On failure:** For rate limit errors, upgrade to Pro plan or implement pull-through cache. For scan failures, verify plan includes scanning (not available on free tier). For multi-arch build failures, ensure QEMU installed with `docker run --privileged --rm tonistiigi\u002Fbinfmt --install all`. For webhook failures, verify endpoint is publicly accessible and returns 200 OK.\n\n### Step 3: Deploy Harbor Self-Hosted Registry\n\nInstall Harbor with Helm for enterprise registry with RBAC and replication.\n\n```bash\n# Add Harbor Helm repository\nhelm repo add harbor https:\u002F\u002Fhelm.gopharbor.io\nhelm repo update\n\n# Create namespace\nkubectl create namespace harbor\n\n# Create values file\ncat > harbor-values.yaml \u003C\u003CEOF\nexpose:\n  type: ingress\n  tls:\n    enabled: true\n    certSource: secret\n    secret:\n      secretName: harbor-tls\n  ingress:\n    hosts:\n      core: harbor.example.com\n    className: nginx\n    annotations:\n      cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\n\nexternalURL: https:\u002F\u002Fharbor.example.com\n\npersistence:\n  enabled: true\n  persistentVolumeClaim:\n    registry:\n      size: 200Gi\n      storageClass: gp3\n    database:\n      size: 10Gi\n      storageClass: gp3\n\nharborAdminPassword: \"ChangeMe123!\"\n\ndatabase:\n  type: internal  # Use external: postgres for production\n\nredis:\n  type: internal  # Use external: redis for production\n\ntrivy:\n  enabled: true\n  skipUpdate: false\n\nnotary:\n  enabled: true  # Image signing\n\nchartmuseum:\n  enabled: true  # Helm chart storage\nEOF\n\n# Install Harbor\nhelm install harbor harbor\u002Fharbor \\\n  --namespace harbor \\\n  --values harbor-values.yaml \\\n  --timeout 10m\n\n# Wait for pods to be ready\nkubectl get pods -n harbor -w\n\n# Get admin password\nkubectl get secret -n harbor harbor-core -o jsonpath='{.data.HARBOR_ADMIN_PASSWORD}' | base64 -d\n\n# Access Harbor UI\necho \"Harbor UI: https:\u002F\u002Fharbor.example.com\"\necho \"Username: admin\"\n\n# Login via Docker CLI\ndocker login harbor.example.com\n# Username: admin\n# Password: (from above)\n\n# Create project via API\ncurl -u \"admin:$HARBOR_PASSWORD\" -X POST \\\n  https:\u002F\u002Fharbor.example.com\u002Fapi\u002Fv2.0\u002Fprojects \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"project_name\": \"myapp\",\n    \"public\": false,\n    \"metadata\": {\n      \"auto_scan\": \"true\",\n      \"severity\": \"high\",\n      \"enable_content_trust\": \"true\"\n    }\n  }'\n\n# Tag and push to Harbor\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:latest\ndocker push harbor.example.com\u002Fmyapp\u002Fapp:latest\n\n# Configure robot account for CI\u002FCD\n# UI: Administration → Robot Accounts → New Robot Account\n# Permissions: Pull, Push to specific projects\n\n# Use robot account in CI\u002FCD\ndocker login harbor.example.com -u 'robot$myapp-ci' -p \"$ROBOT_TOKEN\"\n```\n\n**Expected:** Harbor deploys to Kubernetes with PostgreSQL and Redis. Ingress configured with TLS. Admin UI accessible. Projects created with vulnerability scanning enabled. Robot accounts provide CI\u002FCD authentication. Trivy scans images on push.\n\n**On failure:** For database connection errors, check PostgreSQL pod logs with `kubectl logs -n harbor harbor-database-0`. For Ingress issues, verify DNS points to LoadBalancer and cert-manager issued certificate. For Trivy failures, check if vulnerability database downloaded successfully. For storage issues, verify PVCs bound with `kubectl get pvc -n harbor`.\n\n### Step 4: Implement Image Tagging Strategy and Retention Policies\n\nConfigure semantic versioning, immutable tags, and automatic cleanup.\n\n```bash\n# Tagging best practices\n# 1. Semantic versioning\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:v1.2.3\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:v1.2\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:v1\ndocker tag myapp:latest harbor.example.com\u002Fmyapp\u002Fapp:latest\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Expected:** Images tagged with semantic versions, commit SHAs, and environment labels. Retention policies automatically clean old images based on age, pull activity, or count limits. Production tags (v* pattern) retained longer than development branches. Untagged images deleted to save storage.\n\n**On failure:** For retention not triggering, verify cron schedule syntax and Harbor timezone settings. For accidental deletion of production images, implement immutable tags with Harbor tag immutability rules. For storage still growing, check artifact retention includes Helm charts and other OCI artifacts. For policy conflicts, ensure retention rules use `or` algorithm and don't contradict each other.\n\n### Step 5: Configure Kubernetes Image Pull Secrets\n\nSet up registry authentication for Kubernetes clusters.\n\n```bash\n# Create Docker registry secret\nkubectl create secret docker-registry ghcr-secret \\\n  --docker-server=ghcr.io \\\n  --docker-username=USERNAME \\\n  --docker-password=$GITHUB_TOKEN \\\n  --docker-email=user@example.com \\\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Expected:** Image pull secrets created in target namespaces. Pods successfully pull images from private registries. Service accounts include imagePullSecrets. No ImagePullBackOff errors.\n\n**On failure:** For authentication errors, verify credentials with `docker login` manually. For secret not found, check namespace matches Pod namespace. For still failing, decode secret and verify JSON structure with `kubectl get secret ghcr-secret -o jsonpath='{.data.\\.dockerconfigjson}' | base64 -d | jq`. For token expiration, rotate credentials and update secrets.\n\n### Step 6: Enable Vulnerability Scanning and Image Signing\n\nIntegrate Trivy scanning and Cosign for image provenance.\n\n```bash\n# Install Trivy CLI\nwget https:\u002F\u002Fgithub.com\u002Faquasecurity\u002Ftrivy\u002Freleases\u002Flatest\u002Fdownload\u002Ftrivy_0.47.0_Linux-64bit.tar.gz\ntar zxvf trivy_0.47.0_Linux-64bit.tar.gz\nsudo mv trivy \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# Scan local image\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n**Expected:** Trivy scans detect vulnerabilities with severity ratings. SARIF results upload to GitHub Security tab. Critical vulnerabilities fail CI\u002FCD builds. Cosign signs images with keypair or keyless (Fulcio). Verification succeeds for signed images. Kyverno blocks unsigned images in Kubernetes.\n\n**On failure:** For Trivy database download failures, run `trivy image --download-db-only`. For false positives, create `.trivyignore` file with CVE IDs and justifications. For Cosign signature failures, verify image digest hasn't changed (signatures apply to specific digest, not tags). For Kyverno policy failures, check image reference pattern matches actual image names. For keyless signing, verify OIDC token has sufficient permissions.\n\n## Validation\n\n- [ ] Registry accessible via Docker CLI login\n- [ ] Images push and pull successfully with proper authentication\n- [ ] Multi-architecture images build and manifest created\n- [ ] Vulnerability scanning runs automatically on image push\n- [ ] Retention policies clean old images on schedule\n- [ ] Kubernetes clusters can pull images via imagePullSecrets\n- [ ] Image signatures verified before deployment\n- [ ] Webhook notifications trigger on image updates\n- [ ] Registry UI shows scan results and artifact metadata\n\n## Common Pitfalls\n\n- **Public images by default**: GitHub packages are private by default, Docker Hub public. Verify visibility settings match security requirements.\n\n- **Token expiration**: Personal access tokens expire, breaking CI\u002FCD. Use non-expiring tokens for automation or implement rotation.\n\n- **Untagged image accumulation**: Build process creates untagged images consuming storage. Enable automatic cleanup of untagged artifacts.\n\n- **Missing multi-arch support**: Builds only amd64, fails on ARM instances. Use `docker buildx` with `--platform` flag for cross-platform builds.\n\n- **No rate limit protection**: Free Docker Hub accounts limited to 100 pulls\u002F6h. Implement pull-through cache or upgrade plan.\n\n- **Mutable tags**: `latest` tag overwritten breaks reproducibility. Use immutable tags (commit SHA, semantic version) for production.\n\n- **Insecure registry communication**: Self-hosted registry without TLS. Always use HTTPS with valid certificates.\n\n- **No access control**: Single credential shared across teams. Implement RBAC with project-specific robot accounts.\n\n## Related Skills\n\n- `create-r-dockerfile` - Building container images for registry\n- `optimize-docker-build-cache` - Efficient image builds for registry push\n- `build-ci-cd-pipeline` - Automated registry push in CI\u002FCD\n- `deploy-to-kubernetes` - Pulling images from registry\n- `implement-gitops-workflow` - Image promotion between registries\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"container-registry, docker-hub, ghcr, harbor, vulnerability-scanning","Philipp Thoss","devops","1.0","multi","basic","Julius Brussee homage — caveman","Configure container image registries including GitHub Container Registry (ghcr.io), Docker Hub, and Harbor with automated image scanning, tagging strategies, retention policies, and CI\u002FCD integration for secure image distribution. Use when setting up a private container registry, migrating from Docker Hub to self-hosted registries, implementing vulnerability scanning in CI\u002FCD pipelines, managing multi-architecture images, enforcing image signing, or configuring automatic cleanup and retention policies.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-19","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fsetup-container-registry",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill setup-container-registry",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill setup-container-registry",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill setup-container-registry","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsetup-container-registry\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002FEXAMPLES.md","REFERENCE","参考文档",14326,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsetup-container-registry\u002Freferences\u002FEXAMPLES.md",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]