
Docker Deployment
This walks you through containerizing Node.js apps with Docker, from basic Dockerfiles to multi-stage builds and production deployments. You'll learn how to set up Docker Compose for multi-container stacks with Postgres and Redis, optimize images down from 1GB to 180MB using Alpine, and handle the gotchas like proper signal handling and non-root users. The progression makes sense: start with a simple container, move to compose files, then tackle CI/CD with GitHub Actions. Honestly, the multi-stage build pattern shown here should be your default. If you're still deploying Node apps without containers or your Docker setup is just copy-pasted from Stack Overflow, this gives you the full picture.
- skills.sh installs
- 525
- GitHub stars
- 2
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pluginagentmarketplace/custom-plugin-nodejs --skill docker-deployment --agent claude-codeInstalls into .claude/skills of the current project.
Files
Docker Deployment Skill
Master containerizing and deploying Node.js applications with Docker for consistent, portable deployments.
Quick Start
Dockerize Node.js app in 3 steps:
- Create Dockerfile - Define container image
- Build Image -
docker build -t myapp . - Run Container -
docker run -p 3000:3000 myapp
Core Concepts
Basic Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "src/index.js"]
Multi-Stage Build (Optimized)
# Build stage
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
# Production stage
FROM node:18-alpine
WORKDIR /app
# Copy from builder
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app .
# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001
USER nodejs
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s \
CMD node healthcheck.js || exit 1
CMD ["node", "src/index.js"]
Learning Path
Sponsors
Details
- Repository
- github.com/pluginagentmarketplace/custom-plugin-nodejs
- Categories
- DevOps & CI/CD, Release Management, Mobile Development
- First seen
- Jun 3, 2026