Docker

Docker Intermediate #6: Logging and Debugging
9 min read

Docker Intermediate #6: Logging and Debugging

Handling logs from many containers together, switching log drivers, and using exec, inspect, stats, and dive to look inside containers and images. The wrap-up of Docker Intermediate.

Docker Intermediate #5: Environment Variables and Secrets
8 min read

Docker Intermediate #5: Environment Variables and Secrets

The shapes of env-var injection, .env files and variable interpolation, env_file vs. environment, compose secrets, BuildKit build-time secrets, and the most common mistake of baking secrets into an image.

Docker Intermediate #4: Compose Deep Dive — depends_on, healthcheck, profiles
8 min read

Docker Intermediate #4: Compose Deep Dive — depends_on, healthcheck, profiles

Adding operational sense to compose.yaml. healthcheck for whether the DB is actually ready, depends_on with conditions for meaningful startup order, and profiles to fork dev/test/prod inside one file. Plus override files and restart policies.

Docker Intermediate #3: docker compose Basics — web + db in One File
8 min read

Docker Intermediate #3: docker compose Basics — web + db in One File

A tool for defining several containers in one file and starting them with a single command. The service / network / volume structure of compose.yaml, a real web + postgres setup, and the day-to-day flow of up/down/logs/ps.

Docker Intermediate #2: Build Cache — BuildKit and Layer Ordering
8 min read

Docker Intermediate #2: Build Cache — BuildKit and Layer Ordering

BuildKit-era build caching, in earnest. Spotting where layer cache breaks, sharing npm/pip caches across builds with --mount=type=cache, parallelizing builds with COPY --link, and external caches via GHA / registry.

Docker Intermediate #1: Multi-stage Builds and Image Slimming
8 min read

Docker Intermediate #1: Multi-stage Builds and Image Slimming

Splitting build dependencies from runtime dependencies inside a single Dockerfile. Multi-stage patterns for Go, Node, and Python, all the way to distroless and scratch — the workflow that takes images from gigabytes down to tens of megabytes.

Docker Basics #6: .dockerignore and the Build Context — Using the Cache Well
8 min read

Docker Basics #6: .dockerignore and the Build Context — Using the Cache Well

The most common reason builds get slow or images get bloated is mishandling the build context. What it is, how to trim it with .dockerignore, and how to find where the layer cache breaks so you can order your instructions well. Wrap-up for Docker Basics.

Docker Basics #5: Registries — Docker Hub, GHCR, push/pull
7 min read

Docker Basics #5: Registries — Docker Hub, GHCR, push/pull

To use an image you built on a different machine, you push it to a registry. The structure of an image name, logging into Docker Hub and GHCR, the tag/push/pull flow, and pinning images precisely with digests.

Docker Basics #4: Volumes and Networks — Data and Communication
9 min read

Docker Basics #4: Volumes and Networks — Data and Communication

Keeping data alive after a container dies, and getting containers to talk to each other by name. The difference between bind mount and named volume, the bridge / host / none network modes, and -p port mapping — all in one place.

Docker Basics #3: Images and Containers — build, run, ps, logs, exec
8 min read

Docker Basics #3: Images and Containers — build, run, ps, logs, exec

The day-to-day Docker CLI commands in one place. build options, the run flags you actually use (-d, --name, --rm, -e), and the lifecycle that runs through ps , logs , exec , stop , rm.

Docker Basics #2: Writing Your First Dockerfile — FROM, RUN, COPY, CMD
9 min read

Docker Basics #2: Writing Your First Dockerfile — FROM, RUN, COPY, CMD

Building your first image for your own app. Pick a base with FROM, prepare the environment with RUN, drop in code with COPY, and pin a startup command with CMD. One full cycle, on a tiny Python app.

Docker Basics #1: What Is a Container — VM vs. Docker Ecosystem
9 min read

Docker Basics #1: What Is a Container — VM vs. Docker Ecosystem

Why Docker — how containers differ from virtual machines, why Docker emerged, and a tour of the Docker ecosystem built around Engine, CLI, Compose, and Hub.