Back to library

🐳Docker Containers Basics

Build the mental model first, then the commands — from containers vs VMs through images, layers, volumes, and networking to composing a multi-service app.

Foundations14 drops~2-week path · 5–8 min/daytechnology

Phase 1Containers Under the Hood

Understand what containers actually are under the hood

4 drops
  1. A container is a process, not a machine

    6 min

    A container is a process, not a machine

  2. An image is a recipe, a container is tonight's dinner

    6 min

    An image is a recipe, a container is tonight's dinner

  3. Every Dockerfile line is a snapshot you can reuse

    7 min

    Every Dockerfile line is a snapshot you can reuse

  4. Five commands cover 90% of your Docker day

    7 min

    Five commands cover 90% of your Docker day

Phase 2Dockerfile Craft

Write Dockerfiles for real app types

5 drops
  1. Serve a static site in four lines of Dockerfile

    6 min

    Serve a static site in four lines of Dockerfile

  2. Your node_modules don't belong in the image (mostly)

    7 min

    Your node_modules don't belong in the image (mostly)

  3. Build in one image, ship in another

    7 min

    Build in one image, ship in another

  4. Virtual environments inside containers are redundant (usually)

    6 min

    Virtual environments inside containers are redundant (usually)

  5. Your .dockerignore is as important as your Dockerfile

    6 min

    Your .dockerignore is as important as your Dockerfile

Phase 3Registries, Networks, and Volumes

Wire up registries, networks, and persistent storage

4 drops
  1. Docker Hub is git push for your containers

    7 min

    Docker Hub is git push for your containers

  2. Containers can't talk to each other by default

    7 min

    Containers can't talk to each other by default

  3. Containers forget everything when they die

    7 min

    Containers forget everything when they die

  4. Configuration lives outside the image, always

    7 min

    Configuration lives outside the image, always

Phase 4Compose a Multi-Service App

Containerize and compose a multi-service app

1 drop
  1. One YAML file to rule your entire stack

    8 min

    One YAML file to rule your entire stack

Frequently asked questions

What's the difference between an image and a container?
This is covered in the “Docker Containers Basics” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
How does layer caching work?
This is covered in the “Docker Containers Basics” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
When should I use multi-stage builds?
This is covered in the “Docker Containers Basics” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
How do Docker volumes persist data?
This is covered in the “Docker Containers Basics” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.