Skip to main content
skill CX Codex

docker-containerization · aj-geddes — Claude Code skill for Dockerfiles and image optimization

docker-containerization — a skill that pushes agents toward production-grade Docker builds: multi-stage Dockerfiles, non-root users, smaller images. Use it when an app needs containerizing or an existing Dockerfile needs cleanup.

MIT 683 installs ★ 386 updated 2026-03-04

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill docker-containerization -a claude-code
Open on GitHub

What docker-containerization does

The skill sets rules for the agent whenever Docker work comes up. Multi-stage builds, pinned base image versions, a non-root user in the final stage, .dockerignore, health checks. The repository also carries reference guides on multi-stage builds, optimization, security, and Docker Compose.

Separate guides exist for Python (Django/Flask), Java (Spring Boot), and Go. The README includes a full multi-stage Dockerfile for Node.js with npm ci --only=production, a non-root nodejs user, and EXPOSE 3000. Useful as a starting point, not as a copy-paste for every project.

Installation runs through npx, so Node.js is required. In Claude Code the skill lands at ~/.claude/skills/docker-containerization/SKILL.md.

What it helps with

  • write a Dockerfile with a multi-stage build
  • cut down production image size
  • run the container as a non-root user
  • set up Docker Compose for multiple services
  • keep secrets out of the image

Example prompts for the agent

  • Write a Dockerfile for this Node.js app using the docker-containerization skill
  • This image is too large, optimize it
  • Check my Dockerfile for security problems and fix them

How to install docker-containerization

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill docker-containerization -a claude-code

2Manually: put the files in place

~/.claude/skills/docker-containerization/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/docker-containerization/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about docker-containerization

How do I install docker-containerization in Claude Code?

Run npx skills add aj-geddes/useful-ai-prompts --skill docker-containerization -a claude-code. The skill ends up at ~/.claude/skills/docker-containerization/SKILL.md.

What does docker-containerization do?

It gives the agent a set of Docker practices: multi-stage builds, non-root users, .dockerignore, health checks, minimal layers. Reference guides cover Python, Go, Spring Boot, and Docker Compose.

Which stacks does the skill cover?

There are dedicated guides for Python (Django/Flask), Java (Spring Boot), and Go. The README shows a Node.js multi-stage example with a non-root user.

Source text

SKILL.md · MIT
---
name: docker-containerization
description: >
  Create optimized Docker containers with multi-stage builds, security best
  practices, and minimal image sizes. Use when containerizing applications,
  creating Dockerfiles, optimizing container images, or setting up Docker
  Compose services.
---

# Docker Containerization

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## 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:

```dockerfile
# 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"]
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [Multi-Stage Builds](references/multi-stage-builds.md) | Multi-Stage Builds |
| [Optimization Techniques](references/optimization-techniques.md) | Optimization Techniques |
| [Security Best Practices](references/security-best-practices.md) | Security Best Practices, Environment Configuration |
| [Docker Compose for Multi-Container](references/docker-compose-for-multi-container.md) | Docker Compose for Multi-Container |
| [.dockerignore File](references/dockerignore-file.md) | .dockerignore File |
| [Python](references/python.md) | Python (Django/Flask), Java (Spring Boot), Go |

## Best Practices

### ✅ DO

- Use official base images
- Implement multi-stage builds
- Run as non-root user
- Use .dockerignore
- Pin specific versions
- Include health checks
- Scan for vulnerabilities
- Minimize layers
- Use build caching effectively

### ❌ DON'T

- Use 'latest' tag in production
- Run as root user
- Include secrets in images
- Create unnecessary layers
- Install unnecessary packages
- Ignore security updates
- Store data in containers

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

All skills for DevOps and infrastructure →

docker-containerization by other authors comes first.

docker-containerization ailabs-393 docker-containerization is a Claude Code skill that generates Docker setups for Next.js and Node.js apps. It creates Dockerfiles, docker-compose files and build scripts for different environments. CX Codex +1 1,100installs docker-containerization curiositech docker-containerization generates production-ready Dockerfiles, optimizes layer caching, and writes docker-compose setups for local development. CX Codex +1 143installs containerization-docker-best-practices official github containerization-docker-best-practices guides Docker image creation with rules for multi-stage builds, process isolation, environment portability, and minimal runtime footprints. CX Codex +1 ★ 41,430repo stars docker-project-foundations docker The docker-project-foundations skill bootstraps Docker environments from scratch. It generates a baseline set of .dockerignore, Dockerfile, and compose.yaml files. CX Codex +1 1,700installs docker bobmatnyc docker is a Claude Code skill for packaging applications and dependencies into Docker containers. It covers Dockerfiles, image builds, and multi-service setups with Compose. CX Codex +1 1,100installs docker-expert PCL Team Gives your coding agent Docker expertise: image builds, Dockerfile cleanups, Compose setups. Useful when a container balloons or dies on boot. CX Codex +1 375installs docker-development Alireza Rezvani docker-development optimizes Dockerfiles, configures multi-stage builds, and hardens container security. Useful when setting up docker-compose orchestration or CI/CD delivery pipelines. ★ 30,251repo stars bun-docker secondsky bun-docker — a skill that hands you Dockerfile and docker-compose patterns for Bun apps: oven/bun images, multi-stage builds, hot reload in development. CX Codex +1 431installs

From the same set151

The whole set →
Funnel Analysis Funnel Analysis — a skill that walks a user funnel step by step, measures conversion and drop-off, and plots the results with Python. CX Codex +1 703installs e2e-testing-automation e2e-testing-automation — a skill that helps you write end-to-end tests: browser flows, user journeys and frontend-backend integration checks. CX Codex +1 698installs business-case-development business-case-development walks your agent through a business case: quantify benefits and costs, assess risks, and make the ROI argument to leadership. CX Codex +1 689installs react-component-architecture react-component-architecture — a skill that tells your coding agent how to structure React components: function components, hooks, composition and TypeScript. Useful once a shared component library starts growing. CX Codex +1 687installs log-analysis log-analysis — a skill that helps the agent read application and system logs: spot errors, recurring patterns and the root cause of a failure. Useful when a service breaks and you need answers. CX Codex +1 681installs agile-sprint-planning agile-sprint-planning helps teams organize sprints by setting clear sprint goals, estimating story points, managing backlogs against team velocity, and running standups. CX Codex +1 680installs security-compliance-audit security-compliance-audit is a Claude Code skill that audits compliance with SOC 2, GDPR, HIPAA, PCI-DSS, and ISO 27001. It checks controls, policies, and procedures before certification or an annual review. CX Codex +1 676installs project-estimation project-estimation — a skill that helps the agent estimate project scope, timeline and resources. Useful when you need a budget or a plan you can defend. CX Codex +1 674installs

Project sponsors

Companies that keep this analytics open