Container Registries
Manage container registries including ECR, ACR, GCR, and Docker Hub.
Install
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill container-registries -g -a claude-code -y- Repository
- BagelHole/DevOps-Security-Agent-Skills1.2k
- Category
- DevOps
- Updated
- 6mo ago
- License
- MIT
- Context cost
- Mediumabout 2,064 tokens
- Runs scripts
- No, instructions only
What it does
Manage container registries including ECR, ACR, GCR, and Docker Hub. Push and pull images, configure authentication, set up repository policies, and implement image lifecycle management. Use when working with container image storage and distribution.
Container Registries
Store, manage, and distribute container images across cloud and self-hosted registries.
When to Use This Skill
Use this skill when:
- Pushing and pulling container images
- Configuring registry authentication
- Setting up image retention policies
- Managing private container registries
- Implementing image scanning and security
Prerequisites
- Docker or Podman installed
- Cloud CLI tools (AWS CLI, az, gcloud) for respective registries
- Appropriate IAM permissions
Docker Hub
Authentication
# Login
docker login
# Login with token
echo "$DOCKER_TOKEN" | docker login -u username --password-stdin
Push/Pull Images
# Tag image
docker tag myapp:latest username/myapp:latest
# Push
docker push username/myapp:latest
# Pull
docker pull username/myapp:latest
Automated Builds
Configure in Docker Hub UI:
- Connect GitHub/Bitbucket repository
- Set build rules (branch → tag mapping)
- Configure build context and Dockerfile path
Amazon ECR
Setup
# Create repository
aws ecr create-repository \
--repository-name myapp \
--image-scanning-configuration scanOnPush=true \
--encryption-configuration encryptionType=AES256
# Get registry URI
REGISTRY=$(aws ecr describe-repositories \
--repository-names myapp \
--query 'repositories[0].repositoryUri' \
--output text | cut -d'/' -f1)
Authentication
# Login (Docker)
aws ecr get-login-password --region us-east-1 | \
docker login --username AWS --password-stdin $REGISTRY
# Login with credential helper
# Add to ~/.docker/config.json:
{
"credHelpers": {
"123456789.dkr.ecr.us-east-1.amazonaws.com": "ecr-login"
}
}
Push/Pull
# Tag and push
docker tag myapp:latest $REGISTRY/myapp:latest
docker push $REGISTRY/myapp:latest
# Pull
docker pull $REGISTRY/myapp:latest

