Skip to content

Docker Containers Textbook

A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 170 companion flashcards using spaced repetition.

8 chapters · 170 cards · Updated

Chapters

  1. 1Docker Fundamentals

    Docker is an open-source platform that automates the deployment of applications inside lightweight, portable containers. A Docker container is a runnable instance of a Docker image...

  2. 2Writing Dockerfiles

    A Dockerfile is a script of instructions used to build an image, and the FROM instruction sets the base image on which everything else is built. FROM must be the first non-ARG inst...

  3. 3Building and Distributing Images

    Every instruction in a Dockerfile produces a read-only layer, and layers are stacked to form the final image. When a container runs, a thin writable layer is added on top. Layers a...

  4. 4The Docker CLI

    The docker command-line tool is the day-to-day interface for working with containers and images. docker run creates and starts a new container from an image, accepting many flags a...

  5. 5Networking

    Docker networking is built around several drivers, each with a different isolation and use case. The bridge driver is the default: it creates an isolated network on a single host,...

  6. 6Storage and Volumes

    Containers are ephemeral by default, but Docker provides several mechanisms for persisting data outside the container's writable layer. A Docker volume is a persistent storage obje...

  7. 7Docker Compose

    Docker Compose is a tool for defining and running multi-container applications using a YAML file, traditionally named docker-compose.yml. The top-level structure has three sections...

  8. 8Security and Resource Management

    Running containers securely starts with a handful of well-known practices. Containers should run as a non-root user, set via the USER instruction in the Dockerfile. Base images sho...

← Back to the Docker Containers deck