docker

Original🇺🇸 English
Translated

Docker and Docker Compose reference for container deployment, networking, volumes, and orchestration. Includes Proxmox hosting and LXC comparison patterns. Use when working with docker-compose.yaml, Dockerfiles, troubleshooting containers, or planning container architecture. Triggers: docker, compose, container, dockerfile, volume, network, service, lxc.

1installs
Added on

NPX Install

npx skill4agent add poindexter12/waypoint docker

Docker Skill

Docker and Docker Compose reference for containerized application deployment and management.

Quick Reference

bash
# Container operations
docker ps                         # List running containers
docker ps -a                      # List all containers
docker logs <container>           # View logs
docker logs -f <container>        # Follow logs
docker exec -it <container> sh    # Shell into container
docker inspect <container>        # Full container details

# Compose operations
docker compose up -d              # Start services (detached)
docker compose down               # Stop and remove
docker compose ps                 # List compose services
docker compose logs -f            # Follow all logs
docker compose pull               # Pull latest images
docker compose restart            # Restart services

# Troubleshooting
docker stats                      # Resource usage
docker network ls                 # List networks
docker network inspect <net>      # Network details
docker volume ls                  # List volumes
docker system df                  # Disk usage
docker system prune               # Clean up unused resources

Reference Files

Load on-demand based on task:
TopicFileWhen to Load
Compose Structurecompose.mdWriting docker-compose.yaml
Networkingnetworking.mdNetwork modes, port mapping
Volumesvolumes.mdData persistence, mounts
Dockerfiledockerfile.mdBuilding images
Troubleshootingtroubleshooting.mdCommon errors, diagnostics

Proxmox Integration

TopicFileWhen to Load
Docker on Proxmoxproxmox/hosting.mdVM sizing, storage, GPU passthrough
LXC vs Dockerproxmox/lxc-vs-docker.mdChoosing container type

Compose File Quick Reference

yaml
name: myapp  # Project name (optional)

services:
  web:
    image: nginx:alpine
    ports:
      - "80:80"
    volumes:
      - ./html:/usr/share/nginx/html:ro
    networks:
      - frontend
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost"]
      interval: 30s
      timeout: 10s
      retries: 3

networks:
  frontend:
    driver: bridge

volumes:
  data:

Validation Checklist

Before deploying containers:
  • Services defined with specific image tags (not :latest)
  • Port mappings without conflicts
  • Volumes for persistent data
  • Networks configured appropriately
  • Resource limits set (memory, CPU)
  • Health checks for critical services
  • Restart policy appropriate
  • Secrets not in images or compose file
  • .env file for environment variables

Network Mode Quick Decision

ModeUse CaseIsolation
bridgeDefault, most servicesContainer isolated
hostPerformance, network toolsNo isolation
macvlanDirect LAN accessOwn MAC/IP
ipvlanLike macvlan, shared MACOwn IP
noneNo networkingFull isolation

Volume Type Quick Decision

TypeUse CasePortability
Named volumeDatabase, app dataBest
Bind mountConfig files, devHost-dependent
tmpfsSecrets, cacheMemory only