Agent skill
infra-docker
(ePost) Use when working with Dockerfiles, docker-compose, containers, or containerized deployments
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/infra-docker
Metadata
Additional technical details for this skill
- keywords
-
docker container dockerfile compose deployment devops
- triggers
-
[ "Dockerfile", "docker-compose.yml", "container", "docker" ] - platforms
-
[ "all" ] - agent affinity
-
[ "epost-fullstack-developer", "epost-planner" ]
SKILL.md
Docker Skill
Purpose
Containerization for development and deployment.
When Active
User mentions Docker, container, deployment.
Expertise
Dockerfile Patterns
- Multi-stage builds
- Layer optimization
- Caching strategies
- Security scanning
Docker Compose
- Service definition
- Volume management
- Network configuration
- Environment variables
Build Optimization
- Layer ordering
- .dockerignore
- BuildKit features
- Cache mounts
Production Patterns
- Minimal base images
- Non-root user
- Health checks
- Signal handling
Volume Management
- Named volumes
- Bind mounts
- Volume drivers
- Backup strategies
Network Configuration
- Bridge networks
- Overlay networks
- Service discovery
- Load balancing
Patterns
Multi-stage Node.js Build
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY package*.json ./
RUN npm ci --omit=dev
CMD ["node", "dist/index.js"]
Development Compose
version: '3.8'
services:
app:
build: .
volumes:
- .:/app
ports:
- "3000:3000"
environment:
- NODE_ENV=development
db:
image: postgres:15
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=secret
volumes:
postgres-data:
Production Compose
version: '3.8'
services:
app:
image: registry.example.com/app:latest
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
.dockerignore
node_modules
npm-debug.log
.git
.env
*.md
Best Practices
- Use specific version tags
- Run as non-root user
- Minimize layers
- COPY before RUN for cache
- Use health checks
- Don't bundle development dependencies
Dependencies
- Docker Engine 20+
- Docker Compose v2
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?