/backend-and-infra:dockerfrom backend-and-infra
Docker and Docker Compose for local dev, homelab (Raspberry Pi 5 / ARM64), and production. Scaffolds production-ready Compose configs via /docker, and serves as a best-practice reference for container security, networking, volumes, multi-stage builds, and debugging. Use when writing Dockerfiles, setting up Compose, troubleshooting containers, or doing homelab stack work.
Ships in backend-and-infra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Two things in one skill: a scaffolding command that generates production-ready Docker Compose setups, and a reference of container best practices to apply when reasoning about any Docker work.
/docker/docker [application-type] [options]
api — REST API with databasefullstack — Frontend + Backend + Databasemicroservices — Multi-service architecturedatadog — Application with Datadog monitoringhomelab — Single-host stack tuned for Pi 5 / ARM64references/compose-templates.md for YAML templates) — optimized Dockerfiles, docker-compose.yml, environment variables, networks and volumes.references/dockerfile-patterns.md for multi-stage builds.--env — Environment (development/staging/production)--monitoring — Include Datadog monitoring--secrets — Use Docker secrets for sensitive data--scale — Configure for horizontal scaling--ssl — Include SSL/TLS configuration/docker api --monitoring --env production
/docker fullstack --framework react-node --database postgres
/docker microservices --scale --monitoring
/docker homelab --env production
# Stage: dependencies
FROM node:22-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Stage: dev (hot reload)
FROM node:22-alpine AS dev
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
EXPOSE 3000
CMD ["npm", "run", "dev"]
# Stage: production (minimal image)
FROM node:22-alpine AS production
WORKDIR /app
RUN addgroup -g 1001 -S appgroup && adduser -S appuser -u 1001
USER appuser
COPY --from=build --chown=appuser:appgroup /app/dist ./dist
COPY --from=build --chown=appuser:appgroup /app/node_modules ./node_modules
ENV NODE_ENV=production
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://localhost:3000/health || exit 1
CMD ["node", "dist/server.js"]
Services in the same Compose network resolve by service name:
postgres://postgres:postgres@db:5432/app_dev
redis://redis:6379/0
services:
frontend:
networks: [frontend-net]
api:
networks: [frontend-net, backend-net]
db:
networks: [backend-net] # Only reachable from api
volumes:
- .:/app # Bind mount for hot reload
- /app/node_modules # Protect container deps from host
- pgdata:/var/lib/postgresql/data # Named volume for persistence
docker compose up # Auto-loads override (dev)
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d # Production
:latest)security_opt: [no-new-privileges:true]read_only: true with tmpfs for writable dirscap_drop: [ALL], add back only what's needed.env files or Docker secrets127.0.0.1 only when not needed on the networklinux/arm64 (check Docker Hub tags)deploy.resources.limits.memory: 256Mplatform: linux/arm64 in compose to catch mismatches earlydocker compose logs -f app # Follow logs
docker compose exec app sh # Shell in
docker compose exec db psql -U postgres
docker compose ps # Running services
docker stats # Resource usage
docker compose down -v # Stop + remove volumes (DESTRUCTIVE)
docker system prune # Clean unused images
docker-compose.ymlWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub arosenkranz/agent-config --plugin backend-and-infra6 skills in this plugin
/backend-patternsBackend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes./homelab-helperExpert guidance for homelab infrastructure, self-hosting, and Raspberry Pi optimization. Use when recommending self-hosted services, configuring Docker services, setting up reverse proxies, integrating Home Assistant, or troubleshooting homelab networking./project-setupInteractive project scaffolding with modern tooling for Astro, Vite+React, Express API, Python CLI/Web, Monorepo, and Library projects.Other plugins' skills for the same job