agentleFS
FrankLord27FrankLord27/ai-lordkit/skills/docker-docs/SKILL.md

docker-docs

Skill2 starsChanged 16 days agoMITView on GitHub

Referencia completa de Docker y Docker Compose para desarrollo y producción del stack fullstack. Úsala cuando trabajes con: Dockerfiles multi-stage para NestJS y Next.js, docker-compose.yml para entorno local (PostgreSQL, Redis, MinIO), redes y volúmenes, variables de entorno en contenedores, health checks, o cuando debas dockerizar un servicio nuevo. También activa para: CI/CD con Docker, build cache optimization, configuración de registries, o problemas de networking entre contenedores.

  • Reads credentials
  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Docker — Referencia Completa

Documentación oficial (Context7)

Para la doc oficial y actualizada de Docker, consulta el MCP Context7 (resolve-library-id → query-docs) antes de generar código con APIs que no domines al 100%. Si contradice esta skill en una regla del estándar, gana la skill; si es un detalle de API, gana Context7.

Dockerfile multi-stage (NestJS)

# Build stage
FROM node:24-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build

# Production stage
FROM node:24-alpine AS production
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000
CMD ["node", "dist/main"]

docker-compose.yml estándar (entorno local)

services:
  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: dev
      POSTGRES_PASSWORD: dev
      POSTGRES_DB: app_dev
    ports: ["5432:5432"]
    volumes: [postgres_data:/var/lib/postgresql/data]
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U dev"]
      interval: 10s
      retries: 5

  redis:
    image: redis:7-alpine
    ports: ["6379:6379"]
    command: redis-server --appendonly yes

  minio:
    image: minio/minio
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin
    ports: ["9000:9000", "9001:9001"]
    volumes: [minio_data:/data]

volumes:
  postgres_data:
  minio_data:

Reglas no negociables

  • Multi-stage builds siempre para producción — nunca imagen con devDependencies
  • .dockerignore obligatorio: node_modules, .next, dist, .env*
  • Health checks para servicios con dependencias (postgres, redis)
  • depends_on con condition: service_healthy para garantizar orden de inicio
  • Variables de entorno via env_file o secrets — nunca hardcodeadas en Compose

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.