ilude/claude-code-config/container-workflow
Claude Code and agent skill by ilude/claude-code-config
- community
Checking that the SKILL.md file is still in the repository.
Guidelines for containerized projects using Docker, Dockerfile, docker-compose, container, and containerization. Covers multi-stage builds, security, signal handling, entrypoint scripts, and deployment workflows.
Install
npx vskill@latest install ilude/claude-code-config/container-workflowSKILL.md
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Container-Based Projects
Auto-activate when: Working with Dockerfile, docker-compose.yml, docker-compose.yaml, .dockerignore, Kubernetes manifests (*.yaml, *.yml in k8s directories), container registries, or when user mentions Docker, containers, orchestration, or deployment workflows.
Guidelines for containerized applications using Docker, Docker Compose, and orchestration tools.
Out of Scope
- Infrastructure orchestration - see
ansible-workflow - Kubernetes patterns - separate skill
CRITICAL: Docker Compose V2 Syntax
MUST NOT use `version:` field (deprecated) or `docker-compose` with hyphen:
CRITICAL: DNS Configuration
Dockerfile Core Requirements
Base Images
- Use Alpine Linux for minimal attack surface and smaller images
- Example:
python:3.12-alpine,node:20-alpine - MUST specify version tags for reproducible builds (MUST NOT use
latest) - SHOULD use image digest pinning (SHA256) for production deployments
- Use official images from trusted registries
- Consider distroless images for production
- If Alpine packages unavailable, use Debian Slim-based containers
Multi-stage Builds
- Separate stages for different purposes:
base- Common dependencies and user setupdevelopment- Development tools and dependenciesproduction- Minimal runtime with only production dependencies- Copy only necessary artifacts to final stage
- Reduces final image size and attack surface
- Order commands from least to most frequently changing
Security Checklist
- MUST create and use non-root users
- MUST set USER directive before EXPOSE and CMD
- MUST NOT include secrets in layers
- MUST use
.dockerignoreto exclude sensitive files - SHOULD scan images for vulnerabilities regularly
- SHOULD keep base images updated
- MUST run as non-root user (USER directive)
- MUST NOT hardcode secrets or commit credentials
- MUST validate all input, even from trusted sources
- MUST include health checks for orchestration
- MUST use Docker secrets for sensitive data in production (NOT environment variables)
- MUST set
no-new-privileges:truesecurity option
Project Structure Recognition
Key files: Dockerfile, docker-compose.yml, .dockerignore, .devcontainer/, Makefile, k8s/
Workflow Patterns
Before starting: Check README, Makefile, docker-compose.yml, .env files
Command hierarchy: Makefile - Project scripts - Docker commands
Layer Optimization
Reduce Layer Count
- Group RUN commands to reduce layers
- Use
&&to chain related commands - Clean up in the same layer as installation
Example: Bad vs. Good
Alpine APK Best Practices
- Use
apk add --no-cacheto avoid caching package index - Maintain alphabetical order in package lists for maintainability
- Remove cache in the same RUN command if not using
--no-cache
Cache Optimization
- Order commands from least to most frequently changing
- Copy dependency files separately before copying source code
- Use BuildKit cache mounts for package managers
Package Management Best Practices
Python UV (Modern Package Manager)
Traditional Python Pip
Non-Root User Setup
12-Factor App Compliance
| Factor | Implementation | |
|---|---|---|
| Configuration | Environment variables only, MUST NOT hardcode | |
| Dependencies | Explicit declarations with lockfiles | |
| Stateless | No local state, horizontally scalable | |
| Port Binding | Self-contained, exports via port binding | |
| Disposability | Fast startup/shutdown, graceful termination | |
| Dev/Prod Parity | Keep environments similar |
Resource Limits
MUST define resource limits for production deployments:
Log Rotation
MUST configure log rotation to prevent disk exhaustion:
Complete Multi-Stage Build Template
Health Checks
Docker Compose File Organization
Use include directive for modular Compose files:
Docker Secrets
MUST use Docker secrets over environment variables for sensitive data:
Development Workflow
| Aspect | Development | Production | |
|---|---|---|---|
| Base Image | Full OS for debugging | Alpine (minimal) | |
| Code Mount | Volume mount for hot reload | Copied into image | |
| Dependencies | Include dev tools | Runtime only | |
| Ports | Exposed for debugging | Necessary only | |
| Restart | no (manual control) | unless-stopped | |
| Logging | DEBUG | INFO/WARN |
DevContainer Configuration
Makefile Integration Pattern
Environment Variables
Build-time Variables (ARG)
- Use ARG for build-time configuration
- Common ARGs: PUID, PGID, USER, WORKDIR, VERSION
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/container-workflow/SKILL.md
Popularity
- Repository stars
- 7
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 13 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ilude/claude-code-config/container-workflow)