Skip to content
aj-geddes avatar

Docker Containerization

Practical Dockerfile and Compose guidance that builds small, hardened container images with multi-stage builds.

CCM score
42 of 100
skills.sh installs
685
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers multi-stage builds, image size optimization, security hardening, and Docker Compose setup for multi-container services
  • Includes reference guides for .dockerignore rules, environment configuration, and Python, Java (Spring Boot), and Go containers
  • Enforces non-root users, pinned base image versions, and no secrets or persistent data baked into images
  • Designed for teams containerizing applications, writing Dockerfiles, or building CI/CD container pipelines

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill docker-containerization -y

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

Files

Docker Containerization

Table of Contents

Overview

Build production-ready Docker containers following best practices for security, performance, and maintainability.

When to Use

  • Containerizing applications for deployment
  • Creating Dockerfiles for new services
  • Optimizing existing container images
  • Setting up development environments
  • Building CI/CD container pipelines
  • Implementing microservices

Quick Start

Minimal working example:

# Multi-stage build for Node.js application
# Stage 1: Build
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build

# Stage 2: Production
FROM node:18-alpine
WORKDIR /app
# Copy only production dependencies and built files
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY package*.json ./

# Security: Run as non-root user
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001
USER nodejs

EXPOSE 3000
CMD ["node", "dist/index.js"]

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Category
DevOps & Cloud
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258

Similar to Docker Containerization

More DevOps & Cloud