From dev
Docker CLI expert for containerization. Use when users need to build, run, manage containers, images, networks, volumes, or compose applications.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev:docker-cliThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Docker is a containerization platform that packages applications and dependencies into isolated containers. This guide provides essential workflows and quick references for common Docker operations.
Docker 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:1.27-alpine
# List running containers
docker ps
# Stop a container
docker stop container_name
# Create Dockerfile in your project directory
# Build image
docker build -t myapp:1.0.0 .
# Run container with port mapping
docker run -d -p 8080:80 --name myapp myapp:1.0.0
# 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:1.0.0-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:1.0.0 .
docker tag myapp:1.0.0 username/myapp:v1.0.0
docker tag myapp:1.0.0 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:1.0.0
# 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:
npx claudepluginhub leobrival/livenexx-plugin --plugin devGuides Docker usage: debugging container failures, writing Dockerfiles, docker-compose for integration tests, image optimization, volumes, multi-stage builds, and deployments.
Provides Dockerfile best practices, multi-stage builds for Go/Rust/Node/Python/Java, layer caching, security patterns, and Docker Compose for efficient containers.
Provides Docker Compose setups for local dev stacks with databases and caching, multi-stage Dockerfiles for dev/prod, and patterns for security, networking, volumes, healthchecks.