Generate optimized multi-stage Dockerfile with caching, non-root user, and health checks
Generates optimized multi-stage Dockerfiles with caching, non-root users, and health checks.
/plugin marketplace add mwguerra/claude-code-plugins/plugin install taskmanager@mwguerra-marketplace[--base image] [--multistage] [--output path]You are generating an optimized Dockerfile. Follow these steps:
Determine:
Read the documentation:
skills/docker-docs/references/02-dockerfile.md for complete Dockerfile patternslatest)# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine AS production
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
USER node
EXPOSE 3000
CMD ["node", "dist/index.js"]
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
Create a production-ready Dockerfile with:
$ARGUMENTS