What It Does
Whether you're debugging a misbehaving container or setting up a development environment, this skill puts the right commands at your fingertips without leaving your AI agent.
Docker Essentials is a reference skill covering the core Docker CLI commands and workflows you need for day-to-day container operations. It spans the full lifecycle — from running and managing containers to building images, orchestrating multi-container apps with Compose, and maintaining volumes and networks.
Key Features
- Full Container Lifecycle Management — Covers `docker run`, `docker stop`, `docker start`, `docker restart`, and `docker rm` with common flag combinations. Includes patterns like detached mode, named containers, port mapping, volume mounts, and interactive terminals.
- Inspection & Debugging Toolbox — Provides log-viewing commands (`docker logs -f`, timestamped logs), `docker exec` patterns for opening shells or running one-off commands, `docker inspect` with JSON-path filtering, `docker stats`, and `docker top` for live process visibility.
- Image Build & Registry Operations — Covers building images from a `Dockerfile` with tag, custom file, build args, and `--no-cache` options, as well as pulling, tagging, pushing, and pruning images. Includes a multi-stage build example for producing lean production images.
- Docker Compose Workflows — Includes `docker-compose up/down`, log following per service, service scaling, exec into services, and rebuild-and-restart patterns — everything needed to manage multi-container applications.
- Network & Volume Management — Covers creating, inspecting, connecting, and removing networks and volumes, along with `docker volume prune` and `docker network inspect` for housekeeping and troubleshooting.
- System Cleanup & Disk Usage — Provides `docker system df`, `docker system prune` variants (including image and volume pruning), and individual prune commands for containers, images, and volumes to keep the Docker environment tidy.
Use Cases
- Spinning up a local development environment — Use the development container workflow to mount your source directory, expose a dev server port, and run inside a versioned Node (or other language) image — all with `--rm` so nothing is left behind after you stop.
- Running a database container for local testing — The database workflow example shows how to launch PostgreSQL with a named volume for persistence, environment-variable credentials, and a mapped port — a common pattern for integration testing or local development.
- Debugging a misbehaving production-like container — Chain `docker logs -f`, `docker exec -it … bash`, and `docker inspect` to trace what a container is doing, read its environment, and explore its filesystem without modifying the image.
- Building and publishing a versioned application image — Walk through `docker build` with a multi-stage `Dockerfile`, tag the resulting image with a version and `latest`, then push to a registry — all with the exact flag syntax provided by the skill.