Most teams can get an app running in a container. Fewer have images that build in seconds, weigh tens of megabytes instead of gigabytes, run as a non-root user and pass a vulnerability scan. This course takes you from a working Dockerfile to a production-ready one, and shows how to run a full local stack with Docker Compose that mirrors what you deploy.
What you'll learn
- How image layers and the build cache really work, and how to order a Dockerfile so rebuilds are fast
- Multi-stage builds that separate build tools from the runtime image
- BuildKit features: cache mounts, secret mounts, SSH forwarding and multi-platform builds with
docker buildx - Choosing a base image: slim, Alpine, distroless and the trade-offs of each
- Running as a non-root user, read-only filesystems, dropped capabilities and rootless mode
- Scanning images for vulnerabilities and generating an SBOM with tools such as Docker Scout and Trivy
- Signing images and pinning base images by digest
- Docker Compose for multi-service apps: networks, volumes, health checks, profiles and
depends_onconditions - Compose Watch and dev containers for a fast inner loop
- Logging, resource limits and debugging containers that misbehave
Who it's for
- Developers who already use Docker and want smaller, faster, safer images
- DevOps engineers standardising Dockerfiles across several services
- Teams preparing containers for Kubernetes or a managed container platform
Prerequisites
- Comfortable with basic Docker commands and writing a simple Dockerfile (see Docker & DevOps Basics: CI/CD and Deploying to a VPS)
- Working knowledge of the Linux command line
- Docker Desktop or Docker Engine installed
Outcomes
By the end of this course you will be able to:
- Rewrite a slow, bloated Dockerfile into a cached multi-stage build with a minimal runtime image.
- Harden a container so it runs as non-root with only the permissions it needs.
- Scan, sign and pin images as part of a repeatable build.
- Run a multi-service app locally with Compose, health checks and live reload.
Course outline
| Module | Topic |
|---|---|
| 1 | Layers, the build cache and Dockerfile ordering |
| 2 | Multi-stage builds for Node.js, Python, Go and PHP |
| 3 | BuildKit: cache mounts, secrets and buildx |
| 4 | Base images: slim, Alpine and distroless |
| 5 | Least privilege: users, capabilities and read-only filesystems |
| 6 | Vulnerability scanning and SBOMs |
| 7 | Image signing, digests and registries |
| 8 | Docker Compose for multi-service apps |
| 9 | Health checks, restart policies and startup order |
| 10 | Compose Watch and dev containers |
| 11 | Logs, resource limits and debugging |
| 12 | Project: harden and containerise a real web app |
FAQ
Is this course about Kubernetes?
No. It focuses on building and running good containers. Those images are exactly what you need for Kubernetes Fundamentals, which covers orchestration.
Do I need Docker Desktop?
No. Docker Engine on Linux works for everything in the course. Docker Desktop, Podman and OrbStack users can follow along with minor differences we point out.
Will a scanner make my image secure?
A scanner finds known vulnerabilities in packages; it does not fix design problems. The course pairs scanning with smaller images and least privilege, which together remove most of the risk.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.