Category: Docker

Docker Compose networking: networks, services, and isolation
Learn Docker Compose networking: default networks, service names, ports, custom networks, external networks, and aliases without chasing changing IPs.

Docker Compose volumes and data persistence
Learn Docker Compose volumes: named volumes, bind mounts, database persistence, development workflows, and backups without praying to the container gods.

Docker Compose file structure: health checks, environment variables, and restart
Real health checks with condition: service_healthy, environment variables from .env, restart policies, and a complete working stack that behaves the same on your laptop and in production.

Introduction to Docker Compose: one file, one command
Docker Compose turns four `docker run` commands you run from memory into a single declarative file and one command. This is where Docker starts feeling useful on a daily basis.

Docker image optimization: from 1.2 GB to 85 MB
How to go from Docker images that weigh hundreds of MB to production images that contain exactly what they need: minimal base images, distroless, dive, and layer optimization.

BuildKit in Docker: build secrets, dependency caching, and multi-platform images
BuildKit, Docker's modern build engine: pass secrets safely without leaking them into image layers, cache package downloads between builds, and build for ARM and x86 from one machine.

Advanced Dockerfile instructions: ARG, ENV, ENTRYPOINT and more
Understand once and for all the difference between ARG and ENV, ENTRYPOINT and CMD, and what HEALTHCHECK, VOLUME and EXPOSE actually do in your Dockerfiles.

Multi-stage builds in Docker: smaller, cleaner images
Learn to use multi-stage builds in Docker to separate the build environment from the runtime environment, with real Go and Node.js examples that shrink images from hundreds of megabytes down to a handful.

Dockerfile Best Practices: Security
Build secure Docker images: avoid running as root, scan for vulnerabilities with Trivy, pin versions the right way, and manage secrets without baking them into your image.

Dockerfile Best Practices: Layer Caching and Efficiency
Learn how Docker's layer caching system works, how to order Dockerfile instructions for fast builds, and which base image to choose for lean, efficient images.