Docker guides

Images, containers, Compose, Dockerfile best practices. Free to read, no sign-up.

  1. 01

    Docker Fundamentals for DevOps

    The Docker mental model that makes everything click: an image is a read-only template, a container is a running instance of it - just an isolated process, not a VM. Plus layers, registries, volumes, and the commands you actually use.

    20 min read

  2. 02

    Writing Dockerfiles: Best Practices for Small, Fast Images

    Write Dockerfiles that build fast and ship small: layer caching order, multi-stage builds, base image choices, .dockerignore, non-root users, and the mistakes everyone makes.

    19 min read

  3. 03

    Docker Compose: Running Multi-Container Apps Locally

    Compose declares a whole multi-service app in one file so a single command brings the stack up. The file anatomy, service DNS, the depends_on healthcheck gotcha, and the dev loop.

    16 min read

  4. 04

    Docker Networking Explained

    How Docker networking really works: the default bridge, host and none modes, user-defined networks with DNS by container name, publishing ports, and a debugging workflow.

    18 min read

  5. 05

    Docker Volumes and Persistent Data

    Why containers lose data, and how to keep it: named volumes vs bind mounts vs tmpfs, where the data really lives, sharing and backing up volumes, and the UID pitfalls.

    18 min read

  6. 06

    Debugging Docker Containers

    A systematic method for when a container misbehaves: reading logs and STATUS, decoding exit codes, getting a shell, inspecting config, and fixing the classic port and restart-loop cases.

    18 min read

  7. 07

    Docker in CI/CD Pipelines

    The build, tag, push, deploy flow for Docker images in CI: registry auth, immutable tags by commit SHA, promoting one digest, BuildKit caching, and multi-arch.

    18 min read

  8. 08

    Docker Security Best Practices

    Harden containers where it matters: run as non-root, use minimal pinned base images, scan for CVEs, keep secrets out of layers, and lock down the runtime.

    18 min read

  9. 09

    Docker Registries and Image Distribution

    How Docker registries work: image references and digests, Docker Hub vs GHCR/ECR/GitLab, login and auth, tag strategy, pull-through caches, rate limits, and cleanup.

    18 min read

  10. 10

    Optimizing Docker Image Size and Build Speed

    Shrink Docker images and speed up builds: measure with dive and docker history, cache layers, use BuildKit cache mounts, multi-stage builds, and registry cache in CI.

    21 min read

Ready to test it?

The same topics, asked the way interviewers ask them: a real production incident and a decision you have to defend.

Docker scenario interview questions