Containerization
Package an application as a small, secure, reproducible container image, and run, connect and debug containers locally.
4 objectives 6 steps about 135 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Explain how containers isolate processes with namespaces and cgroups, and how image layers, tags and digests relate in the OCI image format.
- Write a multi-stage Dockerfile that yields a small image running as a non-root user, with cache-friendly layer order and a .dockerignore.
- Run and debug containers: publish ports, mount volumes, pass configuration through environment variables, read logs and exec into a running container.
- Describe a multi-service application with Docker Compose, including networks, volumes, health checks and startup dependencies.
Lesson plan
6 steps, about 135 min · 5 of 5 lessons available so far
- A container is a process with boundaries Concept · 15 min
- Images, overlay layers, the build cache and what not to bake in Concept · 20 min
- Lab: from a naive Dockerfile to a slim, non-root multi-stage image Lab · 30 min
- Running containers deliberately: ports, volumes, bind mounts, devices and GPUs, environment and logs Worked example · 25 min
- Lab: an app and its database with Compose, health checks and a live-reload loop Lab · 30 min
- Check: debug three broken containers Knowledge check · 8 questions
Practise it
Containerize your service with a multi-stage Dockerfile that runs as non-root and stays under an agreed size budget, build it with the BuildKit cache in CI, push it to a registry and record its digest, and run it locally with its database through a Compose file whose health checks gate startup, plus a development profile that bind-mounts the source and reloads on save.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Container RuntimeAdvanced · 12–24 h
References
Hard prerequisites
None.
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.