skills/noise/docker_patterns/SKILL.md
Best practices for Docker containerization and multi-stage builds
npx skillsauth add langchain-ai/skills-benchmarks docker-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build efficient, secure Docker images using modern patterns.
Always use multi-stage builds to minimize image size:
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY . .
USER node
CMD ["node", "server.js"]
USER directivelatestdocker scout or Trivy.dockerignore to exclude sensitive filesHEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
services:
app:
build:
context: .
target: production
environment:
- NODE_ENV=production
deploy:
resources:
limits:
memory: 512M
testing
Unit testing and integration testing best practices
development
Modern React component patterns with hooks and TypeScript
data-ai
Database migration patterns and schema versioning
development
OpenAPI documentation and REST API design patterns