Docker & Containerization
Master container virtualization, Dockerfiles, multi-stage builds, Docker Compose, volumes, networking, and security best practices.
Curriculum & Notes
Click any title or "See Notes" to read concepts1Module 1: Docker Fundamentals & Setup
8 lessonsLearn what Docker is and why developers use it. Understand images vs containers, how Docker differs from a virtual machine, the basic workflow and its limits.
Find out why teams use Docker: consistent environments, faster deployment, easier scaling and microservices support, with real-world use cases.
Compare Docker containers and virtual machines on architecture, startup time, isolation and security, and learn when to choose one or use both together.
Choose between Docker Desktop and Docker Engine, check the requirements, verify the install with docker run hello-world, and fix the three most common failures.
Install Docker Desktop on Windows 10 or 11 with the WSL 2 backend. Covers prerequisites, settings, troubleshooting and filesystem choice for build speed.
Install Docker Desktop on macOS for Intel or Apple Silicon (M1, M2, M3). Covers setup, resource settings, the Dashboard, verifying the install and common fixes.
Install Docker Engine on Ubuntu, Debian, CentOS, RHEL or Fedora with working commands, then run docker without sudo, enable it on boot and fix common errors.
A plain-English guide to core Docker concepts: images, containers, Dockerfile, registry, volumes, networks, Compose, and how the client talks to the daemon.
2Module 2: Images, Registry & Optimization
10 lessonsLearn what a Docker image is, how layers and tags work, how to shrink images, and how to reclaim disk space by removing dangling images and old tags.
Understand how Docker image names and tags are structured, tag images with docker tag, avoid the latest trap, and pin exact versions using digests.
Learn what Docker Hub is, how to find official images, and how to work around pull rate limits. A practical intro to using the default Docker registry.
Use docker pull to download images by tag or digest, read the pull output, and find images with docker search. Includes a hands-on Docker Hub exercise.
Use docker images, docker inspect and docker history to list local images, read their metadata and layers, and check how much disk space Docker uses.
Learn how to build a Docker image with a Dockerfile and docker build. Covers core instructions, .dockerignore and a complete Python API example.
See how Docker image layers and the build cache work, why Dockerfile order matters, and how to speed up docker build by avoiding unneeded cache misses.
Shrink your Docker image with multi-stage builds. See how COPY --from works, follow real examples, and target a single stage with docker build --target.
Reduce Docker image size with slim base images, merged RUN layers, a .dockerignore file and non-root users. Eight practical steps with examples.
Manage local images with docker tag, docker rmi, docker push and docker save/load. Includes cleanup with docker image prune and the export vs save difference.
3Module 3: Container Runtime & Networking
9 lessonsLearn how Docker containers work, from docker run and the container lifecycle to port publishing, restart policies and why a container exits immediately.
Learn the docker run command with real examples: detached and interactive mode, naming, port mapping, resource limits, restart policies and more.
Understand docker stop vs kill and every container state. Start, restart, pause and rename containers, and read exit codes to see why one stopped.
Use docker exec -it to open a bash shell in a container, then copy files with docker cp and inspect processes with docker top, attach and inspect.
Read container output with docker logs -f and --tail, filter it with grep, and monitor resource use with docker stats, events and health checks.
Learn how Docker networking works: bridge, host and user-defined networks, port publishing with -p, container DNS, and how EXPOSE differs from -p.
Keep data after a container is removed. Compare named volumes, bind mounts and tmpfs, then share, back up and restore volumes with working commands.
Pass docker environment variables with the -e flag and --env-file, check them in a running container, and learn why secrets need a safer approach.
Free disk space with docker system prune, docker rm and docker image prune. Learn what each command deletes, what is safe, and how to automate cleanup.
4Module 4: Dockerfile Deep Dive & Syntax
9 lessonsLearn how to write a Dockerfile: FROM, COPY, RUN and CMD, layer caching, .dockerignore, multi-stage builds, HEALTHCHECK and the mistakes that bloat images.
Choose the right Dockerfile FROM base image: alpine vs slim vs full, pinning tags and digests, multi-stage FROM, platform targeting and the scratch image.
Learn when to use COPY vs ADD in a Dockerfile. Covers build context, --chown and --chmod, COPY --from, the dependency-manifest pattern and .dockerignore.
Learn how the Dockerfile RUN instruction works, including shell vs exec form, apt-get best practices, same-layer cleanup, cache mounts, secrets and heredocs.
Learn the difference between CMD and ENTRYPOINT in a Dockerfile, how to combine them, when to use exec vs shell form, and how to override both at runtime.
Learn the difference between ENV and ARG in a Dockerfile, how ARG scoping works, why neither is safe for secrets, and how ARG affects the build cache.
Learn what WORKDIR, EXPOSE, USER, LABEL and HEALTHCHECK do in a Dockerfile, why EXPOSE publishes nothing, and when VOLUME causes problems in builds.
Write safer, smaller Dockerfiles. Covers exec form for SIGTERM, non-root users, secrets, layer order, multi-stage builds, pinned bases, scanning and hadolint.
Copy production-ready Dockerfile examples for Node.js, Python FastAPI, Go, React with Nginx, Spring Boot and Django, and see the pattern they all share.
5Module 5: Storage & Volumes
4 lessonsLearn why container data disappears and how Docker volumes fix it. Compare the three mount types, handle permission problems, and back up or clean up volumes.
Create Docker named volumes with docker volume create, -v and --mount. See how data survives container removal and how to share a volume.
Learn how to use a Docker bind mount with -v and --mount to share a host directory, make it read-only with :ro, and set up live reload for development.
Manage Docker volumes with docker volume ls, inspect, rm and prune. Learn how to back up a volume, restore it from a tar archive and migrate data between hosts.