docker-essentials-1-0-0Essential Docker commands and workflows for container management, image operations, and debugging.
Install via ClawdBot CLI:
clawdbot install pespringer/docker-essentials-1-0-0Requires:
Essential Docker commands for container and image management.
# Run container from image
docker run nginx
# Run in background (detached)
docker run -d nginx
# Run with name
docker run --name my-nginx -d nginx
# Run with port mapping
docker run -p 8080:80 -d nginx
# Run with environment variables
docker run -e MY_VAR=value -d app
# Run with volume mount
docker run -v /host/path:/container/path -d app
# Run with auto-remove on exit
docker run --rm alpine echo "Hello"
# Interactive terminal
docker run -it ubuntu bash
# List running containers
docker ps
# List all containers (including stopped)
docker ps -a
# Stop container
docker stop container_name
# Start stopped container
docker start container_name
# Restart container
docker restart container_name
# Remove container
docker rm container_name
# Force remove running container
docker rm -f container_name
# Remove all stopped containers
docker container prune
# Show logs
docker logs container_name
# Follow logs (like tail -f)
docker logs -f container_name
# Last 100 lines
docker logs --tail 100 container_name
# Logs with timestamps
docker logs -t container_name
# Execute command in running container
docker exec container_name ls -la
# Interactive shell
docker exec -it container_name bash
# Execute as specific user
docker exec -u root -it container_name bash
# Execute with environment variable
docker exec -e VAR=value container_name env
# Inspect container details
docker inspect container_name
# Get specific field (JSON path)
docker inspect -f '{{.NetworkSettings.IPAddress}}' container_name
# View container stats
docker stats
# View specific container stats
docker stats container_name
# View processes in container
docker top container_name
# Build from Dockerfile
docker build -t myapp:1.0 .
# Build with custom Dockerfile
docker build -f Dockerfile.dev -t myapp:dev .
# Build with build args
docker build --build-arg VERSION=1.0 -t myapp .
# Build without cache
docker build --no-cache -t myapp .
# List images
docker images
# Pull image from registry
docker pull nginx:latest
# Tag image
docker tag myapp:1.0 myapp:latest
# Push to registry
docker push myrepo/myapp:1.0
# Remove image
docker rmi image_name
# Remove unused images
docker image prune
# Remove all unused images
docker image prune -a
# Start services
docker-compose up
# Start in background
docker-compose up -d
# Stop services
docker-compose down
# Stop and remove volumes
docker-compose down -v
# View logs
docker-compose logs
# Follow logs for specific service
docker-compose logs -f web
# Scale service
docker-compose up -d --scale web=3
# List services
docker-compose ps
# Execute command in service
docker-compose exec web bash
# Restart service
docker-compose restart web
# Rebuild service
docker-compose build web
# Rebuild and restart
docker-compose up -d --build
# List networks
docker network ls
# Create network
docker network create mynetwork
# Connect container to network
docker network connect mynetwork container_name
# Disconnect from network
docker network disconnect mynetwork container_name
# Inspect network
docker network inspect mynetwork
# Remove network
docker network rm mynetwork
# List volumes
docker volume ls
# Create volume
docker volume create myvolume
# Inspect volume
docker volume inspect myvolume
# Remove volume
docker volume rm myvolume
# Remove unused volumes
docker volume prune
# Run with volume
docker run -v myvolume:/data -d app
# View disk usage
docker system df
# Clean up everything unused
docker system prune
# Clean up including unused images
docker system prune -a
# Clean up including volumes
docker system prune --volumes
# Show Docker info
docker info
# Show Docker version
docker version
Development container:
docker run -it --rm \
-v $(pwd):/app \
-w /app \
-p 3000:3000 \
node:18 \
npm run dev
Database container:
docker run -d \
--name postgres \
-e POSTGRES_PASSWORD=secret \
-e POSTGRES_DB=mydb \
-v postgres-data:/var/lib/postgresql/data \
-p 5432:5432 \
postgres:15
Quick debugging:
# Shell into running container
docker exec -it container_name sh
# Copy file from container
docker cp container_name:/path/to/file ./local/path
# Copy file to container
docker cp ./local/file container_name:/path/in/container
Multi-stage build:
# Dockerfile
FROM node:18 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
docker run flags:
-d: Detached mode (background)-it: Interactive terminal-p: Port mapping (host:container)-v: Volume mount-e: Environment variable--name: Container name--rm: Auto-remove on exit--network: Connect to networkdocker exec flags:
-it: Interactive terminal-u: User-w: Working directory.dockerignore to exclude files from build contextRUN commands in Dockerfile to reduce layers--rm for one-off containersdocker-compose for multi-container appsdocker system pruneOfficial docs: https://docs.docker.com/
Dockerfile reference: https://docs.docker.com/engine/reference/builder/
Compose file reference: https://docs.docker.com/compose/compose-file/
Generated Mar 1, 2026
Developers use Docker to create isolated, reproducible development environments with consistent dependencies. This scenario involves running containers for web apps, databases, and services, using Docker Compose to orchestrate multiple containers, ensuring all team members work in identical setups.
Teams integrate Docker into continuous integration and deployment pipelines to build, test, and deploy applications as containerized images. This includes using Dockerfiles for automated builds, pushing images to registries, and running tests in isolated containers to ensure consistency across stages.
Organizations deploy microservices architectures using Docker to containerize individual services, manage networking between them, and scale services independently. This scenario involves running multiple containers, configuring Docker networks, and using Docker Compose for local or production-like setups.
IT teams use Docker to run database containers like PostgreSQL or MySQL for development, testing, or lightweight production. This includes managing volumes for data persistence, setting up environment variables for configuration, and performing backups by copying data from containers.
Support engineers leverage Docker commands to inspect running containers, view logs, and execute commands for debugging application issues in production environments. This scenario involves using exec for shell access, logs for monitoring, and inspect for detailed container information.
A software-as-a-service company uses Docker to deploy and manage its multi-tenant applications in containers, enabling scalable, isolated instances for each customer. Revenue is generated through subscription fees based on usage tiers, with Docker facilitating rapid deployment and resource optimization.
A consultancy offers Docker expertise to help businesses adopt containerization, providing services like migration, optimization, and training workshops. Revenue comes from project-based fees and recurring training sessions, leveraging Docker skills to improve client efficiency and reduce infrastructure costs.
A platform hosts and sells pre-built Docker images, templates, and management tools for common applications, targeting developers and enterprises. Revenue is generated through one-time purchases, licensing fees, or premium support, with Docker enabling easy distribution and deployment of software.
💬 Integration Tip
Integrate Docker with version control systems like Git to manage Dockerfiles and compose files, and use environment variables for configuration to enhance portability across different deployment environments.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.