- Home
- Skills
- DevOps & Cloud
- docker-production-pro
More screenshots
Works with the AI tools you already use
Docker Production Pro
Generate ultra-lean (<100MB), secure multi-stage Dockerfiles and compose setups with optimized layer caching.
$7
docker-production-pro
Example session with this skill installed
Dockerize my Node.js Express API. I use pnpm and need to connect to a Postgres database. Make sure it is secure and small for production.
- Read your context and instructions
- Compiled the docker-production-pro
I have analyzed your Node.js Express stack. I've implemented a multi-stage build using node:20-bookworm-slim to minimize size, configured pnpm with store pruning, and set up a non-root user for execution.
Production Configuration
# Stage 1: Builder
FROM node:20-bookworm-slim AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
COPY pnpm-lock.yaml package.json ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
# Stage 2: Runtime
FROM node:20-bookworm-slim
RUN groupadd -g 10001 appgroup && \
useradd -u 10001 -g appgroup -s /bin/sh -m appuser
WORKDIR /app
COPY --from=builder --chown=appuser:appgroup /app/dist ./dist
COPY --from=builder --chown=appuser:appgroup /app/node_modules ./node_modules
COPY --from=builder --chown=appuser:appgroup /app/package.json ./package.json
USER appuser
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s \
CMD node -e "fetch('http://localhost:3000/health').then(r => r.ok ? process.exit(0) : process.exit(1))"
CMD ["node", "dist/index.js"]
# docker-compose.yml
version: '3.8'
services:
api:
build: .
restart: always
environment:
- DATABASE_URL=postgres://user:pass@db:5432/app
depends_on:
db:
condition: service_healthy
networks:
- backend
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
db:
image: postgres:16-alpine
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d app"]
interval: 10s
timeout: 5s
retries: 5
networks:
- backend
volumes:
- pgdata:/var/lib/postgresql/data
networks:
backend:
driver: bridge
volumes:
pgdata:
Next steps
- Create a
.dockerignorefile containingnode_modules,.git, and.env. - Run
docker compose up --build -dto start the stack. - Check the image size using
docker imagesto verify the slim footprint.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The Problem
AI coding agents frequently generate bloated, unoptimized, and insecure Dockerfiles. They typically result in 1.5GB+ container images, broken layer caching that forces 10-minute rebuilds, missing healthchecks, and dangerous root-user execution that exposes your infrastructure to vulnerabilities.
What Docker Production Pro Does
- Ultra-Lean Multi-Stage Builds: Generates minimal runtime images (often <100MB) using Alpine or Distroless bases, slashing deployment times and bandwidth costs.
- Deterministic Layer Caching: Structures dependency installation and code copies perfectly so rebuilds take seconds instead of minutes.
- Zero-Trust Security Hardening: Enforces non-root users, drops unnecessary Linux capabilities, and generates bulletproof
.dockerignorefiles to prevent secret leakage. - Production-Ready Compose & Healthchecks: Crafts resilient
docker-compose.ymlconfigs with healthchecks, graceful shutdown handling, and resource limits.
Supported Stacks
Works flawlessly across Python (FastAPI, Django, Flask), Node.js / Bun / Next.js, Go, Rust, and PostgreSQL / Redis architectures in Claude Code, Cursor, and Codex.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install