From dev
Docker CLI expert for containerization. Use when users need to build, run, manage containers, images, networks, volumes, or compose applications.
npx claudepluginhub leobrival/livenexx-plugin --plugin devThis skill is limited to using the following tools:
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.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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: