Skip to content

Containerize Node.js apps with multi-stage Docker builds, Compose stacks, and production hardening guidance.

CCM score
36 of 100
skills.sh installs
532
GitHub stars
2
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Dockerfile authoring, image builds, container runs, and deploying to Docker Hub or CI pipelines
  • Includes a multi-stage Dockerfile, a Compose file for app, Postgres, Redis, and Nginx, and a healthcheck.js script
  • Guides non-root users, .dockerignore exclusions, Alpine base images, and npm ci --only=production for smaller, safer images
  • Designed for developers moving Node.js services into dev, staging, and production environments with GitHub Actions builds

Install

$ npx -y skills add pluginagentmarketplace/custom-plugin-nodejs --skill docker-deployment -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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:

  1. Create Dockerfile - Define container image
  2. Build Image - docker build -t myapp .
  3. 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

Details

Repository
github.com/pluginagentmarketplace/custom-plugin-nodejs
Categories
DevOps & Cloud, Backend & APIs
First seen
Jun 3, 2026

More from pluginagentmarketplace/custom-plugin-nodejs

All 4

Similar to Docker Deployment

More DevOps & Cloud