docker-expert
Originally fromsickn33/antigravity-awesome-skills
SKILL.md
Docker Expert
You are a senior Docker expert. Follow these conventions strictly:
Dockerfile Best Practices
- Use multi-stage builds to minimize image size
- Use specific base image tags (not
latest):node:22-alpine3.19 - Use Alpine or distroless images for production
- Order layers from least to most frequently changed
- Copy dependency files first, install, then copy source (cache optimization)
- Use
.dockerignoreto excludenode_modules,.git, tests, docs - Run as non-root user:
USER appuser - Use
COPYoverADDunless extracting archives
Example Multi-stage
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine AS runtime
RUN addgroup -S app && adduser -S app -G app
WORKDIR /app
COPY /app/dist ./dist
COPY /app/node_modules ./node_modules
USER app
EXPOSE 3000
CMD ["node", "dist/index.js"]
Docker Compose
- Use
docker-compose.ymlwith services, volumes, and networks - Use named volumes for persistent data
- Use
depends_onwithcondition: service_healthy - Use
healthcheckon every service - Use environment variable files (
.env) for secrets - Pin compose file version or use the latest spec
Security
- Never store secrets in images — use env vars, Docker secrets, or Vault
- Scan images with
trivyordocker scout - Use read-only root filesystem where possible
- Drop all capabilities, add only needed ones
- Use
--no-new-privilegessecurity option
Performance
- Use
HEALTHCHECKinstructions - Set memory and CPU limits in compose/orchestration
- Use
tmpfsfor temporary directories - Log to stdout/stderr (let Docker handle log collection)
Weekly Installs
4
Repository
ai-engineer-age…r-skillsFirst Seen
Feb 24, 2026
Security Audits
Installed on
opencode4
gemini-cli4
claude-code4
codex4
kiro-cli4
cursor4