Docker Cheat Sheet

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production; see the section bibliography for the reference material consulted while preparing these pages.

A single-page, colour-coded summary of the Docker essentials — the architecture one-liners (CLI to API to dockerd to containerd to runc), the image commands, the Dockerfile instruction table with the CMD/ENTRYPOINT forms and the RUN --mount types, a multi-stage skeleton, the docker run option groups and lifecycle commands, volume/bind-mount/tmpfs syntax, networking one-liners, the Compose file skeleton and CLI, the Buildx essentials (--platform, --cache-to type=gha, --sbom --provenance, bake), a security checklist, the clean-up commands, the Spring Boot mapping (spring-boot:build-image, jarmode=tools extract --layers, spring-boot-docker-compose, spring-boot-testcontainers with @ServiceConnection, ComposeContainer, Surefire *Test vs. Failsafe *IT) and the GitHub Actions skeleton (setup-buildx to login to metadata to build-push) — handy for quick memorization or as a printable desk reference. It reflects Docker Engine 29.8.x, Compose v5.5.x, Buildx 0.37.x with BuildKit 0.33.x, Testcontainers 2.0.5 and Spring Boot 4.1.x.

For the full explanation, every option, and additional examples, see the dedicated pages:

Registries, security and orchestration — Registries and Docker Hub, Docker Security, and Orchestration: Swarm Mode and Kubernetes.