Container Registries
Use When
- The user asks to publish/push container images to GHCR, Docker Hub, ECR, or ACR.
- The user asks for
docker/CI workflow setup for registry authentication. - The user asks about image tags (
latest, semver, SHA) or release-triggered publishing. - The user needs multi-architecture image builds (
linux/amd64,linux/arm64).
Primary Actions
- Generate or update CI workflows for registry login, build, and push.
- Configure tag generation strategy (semver + SHA + optional latest/edge).
- Configure Buildx/QEMU for multi-architecture builds.
- Add post-publish validation commands and recovery checks.
Quick Commands
# Login examples
echo "$GITHUB_TOKEN" | docker login ghcr.io -u USERNAME --password-stdin
echo "$DOCKERHUB_TOKEN" | docker login -u USERNAME --password-stdin
# Build and push multi-arch
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/myorg/myapp:v1.2.3 --push .
# Post-publish validation
docker buildx imagetools inspect ghcr.io/myorg/myapp:v1.2.3
docker manifest inspect ghcr.io/myorg/myapp:v1.2.3
Validation-First Publishing Workflow
- Authenticate with registry credentials or OIDC.
- Build and push with deterministic tags.
- Validate image exists with
imagetools inspect. - Validate multi-arch manifest with
docker manifest inspect. - Smoke pull target tag to confirm availability.
- If failed: check auth scopes/role permissions, tag generation, and pushed digest.
Registry Selection (Quick)
| Scenario | Recommended Registry |
|----------|----------------------|
| GitHub-hosted open-source project | GHCR |
| Broadest public distribution | Docker Hub |
| AWS deployment target | ECR |
| Azure deployment target | ACR |
Keep SKILL.md Lean; Use Deep References
- GHCR details (tokens, visibility, repo linking, package management):
- CI build/push details (build-push-action, matrix multi-arch, cache, release patterns):
references/ci-image-publishing.md
- Authentication workflows, post-publish validation, failure recovery, and retention:
references/registry-operations.md