setup-docker-containers — Claude Code command: Docker setup
Sets up Docker for development and production projects, covering multi-stage builds, Compose environments, and container workflows.
npx claude-code-templates@latest --command setup/setup-docker-containersWhat setup-docker-containers does
The command inspects package.json or requirements.txt to identify the application type. It checks for an existing Dockerfile or docker-compose.yml and counts dependency lock files before choosing a container setup. Arguments select development, production, microservices, or Compose work.
It can create a multi-stage Dockerfile, tune layer caching, and reduce image size. Development settings cover hot reload, mounted volumes, and debugging. Production settings include health checks, vulnerability scanning, and resource limits.
The setup may also include service networking, CI/CD integration, registry handling, log collection, and container monitoring. The command uses Read, Write, Edit, and Bash. For a project without Docker files, it builds the initial container setup from the detected application type.
What it helps with
- create a multi-stage Dockerfile
- set up hot reload with mounted volumes
- configure a Docker Compose environment
- add health checks and resource limits
- connect container builds to CI/CD
Example prompts for the agent
- Set up Docker for development with
--development. - Prepare a production container setup with
--productionand health checks. - Configure a microservices environment with
--microservices.
How to install setup-docker-containers
1claude-code-templates
npx claude-code-templates@latest --command setup/setup-docker-containers2Manually: put the files in place
.claude/commands/setup-docker-containers.mdCall it with /setup-docker-containers. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/setup-docker-containers.mdCall it with /prompts:setup-docker-containers. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/setup-docker-containers.prompt.mdManually: put the files in place
.gemini/commands/setup-docker-containers.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about setup-docker-containers
How do I install setup-docker-containers in Claude Code?
Run npx claude-code-templates@latest --command setup/setup-docker-containers, then use .claude/commands/setup-docker-containers.md.
What does setup-docker-containers do?
It configures Docker files and workflows for development or production. The command can also set up Compose, service networking, CI/CD, logs, and monitoring.
Which modes does setup-docker-containers support?
You can pass [environment-type], --development, --production, --microservices, or --compose.
Source text
setup-docker-containers.md · MIT
--- allowed-tools: Read, Write, Edit, Bash argument-hint: "[environment-type] | --development | --production | --microservices | --compose" description: Setup Docker containerization with multi-stage builds and development workflows --- # Setup Docker Containers Setup comprehensive Docker containerization for development and production: **$ARGUMENTS** ## Current Project State - Application type: @package.json or @requirements.txt (detect Node.js, Python, etc.) - Existing Docker: @Dockerfile or @docker-compose.yml (if exists) - Dependencies: !`find . -name "package-lock.json" -o -name "poetry.lock" -o -name "Pipfile.lock" | wc -l` - Services needed: Database, cache, message queue detection from configs ## Task Implement production-ready Docker containerization with optimized builds and development workflows: **Environment Type**: Use $ARGUMENTS to specify development, production, microservices, or Docker Compose setup **Containerization Strategy**: 1. **Dockerfile Creation** - Multi-stage builds, layer optimization, security best practices 2. **Development Workflow** - Hot reloading, volume mounts, debugging capabilities 3. **Production Optimization** - Image size reduction, security scanning, health checks 4. **Multi-Service Setup** - Docker Compose, service discovery, networking configuration 5. **CI/CD Integration** - Build automation, registry management, deployment pipelines 6. **Monitoring & Logs** - Container observability, log aggregation, resource monitoring **Security Features**: Non-root users, minimal base images, vulnerability scanning, secrets management. **Performance Optimization**: Layer caching, build contexts, multi-platform builds, and resource constraints. **Output**: Complete Docker setup with optimized containers, development workflows, production deployment, and comprehensive documentation.
© davila7 · MIT · davila7/claude-code-templates