Docker CLI expert for containerization. Use when users need to build, run, manage containers, images, networks, volumes, or compose applications.
/plugin marketplace add leobrival/topographic-plugins-official/plugin install dev@topographic-plugins-officialThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/commands-reference.mdreference/common-patterns.mdreference/troubleshooting.mdDocker is a containerization platform that packages applications and dependencies into isolated containers. This guide provides essential workflows and quick references for common Docker operations.
# Check Docker installation
docker --version
# Run your first container
docker run hello-world
# Run interactive container
docker run -it ubuntu bash
# Run container in background
docker run -d nginx
# List running containers
docker ps
# Stop a container
docker stop container_name
# Create Dockerfile in your project directory
# Build image
docker build -t myapp:latest .
# Run container with port mapping
docker run -d -p 8080:80 --name myapp myapp:latest
# View logs
docker logs -f myapp
# Access container shell
docker exec -it myapp bash
# Run with volume mount for live code updates
docker run -d \
-p 8080:80 \
-v $(pwd)/src:/app/src \
--name myapp-dev \
myapp:dev
# Watch logs in real-time
docker logs -f myapp-dev
# Restart after configuration changes
docker restart myapp-dev
# Create docker-compose.yml with services
# Start all services
docker compose up -d
# View service logs
docker compose logs -f
# Scale a service
docker compose up -d --scale api=3
# Stop all services
docker compose down
# Stop and remove volumes
docker compose down -v
# Login to registry
docker login
# Build and tag image
docker build -t myapp:latest .
docker tag myapp:latest username/myapp:v1.0.0
docker tag myapp:latest username/myapp:latest
# Push to registry
docker push username/myapp:v1.0.0
docker push username/myapp:latest
# Check container status
docker ps -a
# View container logs
docker logs container_name
# Inspect container details
docker inspect container_name
# Run interactive shell for debugging
docker run -it --entrypoint /bin/bash myapp:latest
# Check container resource usage
docker stats container_name
When to use which command:
docker run with appropriate flagsdocker exec -it container_name bashdocker build -t name:tag .docker compose up/downdocker ps or docker ps -adocker logs -f container_namedocker system prune or specific prune commands# With environment variables
docker run -e ENV_VAR=value -e API_KEY=secret myapp
# With resource limits
docker run --memory=512m --cpus=1.5 myapp
# With restart policy
docker run --restart=unless-stopped myapp
# With custom network
docker run --network mynetwork myapp
# With volume mount
docker run -v mydata:/app/data myapp
# Create custom network
docker network create myapp-network
# Run containers on same network
docker run -d --name database --network myapp-network postgres:15
docker run -d --name app --network myapp-network -p 8080:80 myapp
# Containers can now access each other by name
# Example: app can connect to database using hostname "database"
# Create named volume
docker volume create myapp-data
# Use volume in container
docker run -d -v myapp-data:/var/lib/postgresql/data postgres:15
# Backup volume data
docker run --rm \
-v myapp-data:/data \
-v $(pwd):/backup \
ubuntu tar czf /backup/backup.tar.gz /data
Common Issues:
Container exits immediately
docker logs container_nameCan't access service on published port
docker port container_namePermission denied errors
docker run -u $(id -u):$(id -g)Disk space issues
docker system prune -a --volumesNetwork connectivity issues
docker network inspect bridgeFor detailed troubleshooting steps, see the Troubleshooting Guide.
Load as needed for detailed information:
Commands Reference - Complete CLI command documentation with all flags and options. Use when you need exact syntax or flag details for any Docker command.
Common Patterns - Real-world patterns and workflows for development, multi-stage builds, networking, volumes, CI/CD, security, and production deployments. Use for implementing specific workflows or integrations.
Troubleshooting Guide - Detailed error messages, diagnosis steps, and resolution strategies for container, image, network, volume, performance, and system issues. Use when encountering errors or unexpected behavior.
When to use each reference:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.