---
title: "Docker roadmap"
description: "A step-by-step Docker roadmap: containers and the Linux beneath them, images and Dockerfiles, volumes, networks, Compose, registries, security and deployment."
url: "https://opsfolk.com/roadmaps/docker"
stages: 10
topics: 41
updated: "2026-11-14T19:48:16.072Z"
reviewed: "2026-11-14"
image: "https://media.opsfolk.com/2026/11/31efd964d774713029cb70f6-2400x1350.webp"
---

# Docker roadmap

Learn Docker in order: what a container is and the Linux under it, then running containers, storage and networks, building images, registries, Compose, security, a daily workflow and deploying.

Learn it in this order: each stage builds on the ones before it. A topic marked optional can wait.

## 1. Foundations

What a container is, how it differs from a VM, and the standards behind it.

### Linux and the shell (optional)

The terminal, files, permissions and processes: what Docker assumes you know.

Docker is driven from a terminal, and almost every image is a small Linux system. You will read logs, set file permissions, install packages with `apt` or `apk`, and write short shell commands in a Dockerfile's `RUN` lines.

You do not need to be a Linux expert. Be at ease moving around the file system, reading and setting permissions with `chmod` and `chown`, knowing what a user and a group are, listing processes, and writing a few lines of shell script.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [The Bash reference manual](https://www.gnu.org/software/bash/manual/bash.html)
- Official: [Linux namespaces and processes, in the man pages](https://man7.org/linux/man-pages/man7/namespaces.7.html)

Topic page: https://opsfolk.com/roadmaps/docker/topics/linux-and-the-shell

### What a container is

A process isolated from the rest of the machine, started from an image.

A container is an ordinary process on the host, isolated so that it sees its own files, network and process list, and limited in the CPU and memory it may use. It starts from an image: a read-only bundle of a program and everything it needs to run.

This is what makes containers useful. The same image runs the same way on a laptop, a CI runner and a server, and many containers share one machine without getting in each other's way.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [What is a container?, in the Docker documentation](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-container/)
- Official: [What is an image?](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-an-image/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/what-a-container-is

### Containers and virtual machines

Why a container shares the host's kernel, and what that costs and gives.

A virtual machine emulates hardware and runs a whole operating system with its own kernel. A container shares the host's kernel and isolates only the process, so it starts in a fraction of a second and uses far less memory.

The trade is isolation: a VM's boundary is stronger, and a Linux container needs a Linux kernel. That is why Docker Desktop on macOS and Windows runs a small Linux VM, and why many platforms put containers inside VMs. Bare metal, VMs and containers are layers you combine, not rivals.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Containers versus virtual machines](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-container/)
- Official: [Docker overview](https://docs.docker.com/get-started/docker-overview/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/containers-and-virtual-machines

### Docker and the OCI

Docker is one tool; the image and runtime formats are open standards.

Docker made containers popular, and in 2015 its image format and runtime were given to the Open Container Initiative. The OCI's image and runtime specifications are why an image built with Docker runs under Podman, containerd or Kubernetes.

Know the names you will meet: Docker Engine and its CLI, containerd, which runs containers for Docker and for most Kubernetes clusters, runc, which starts them, and Podman and Buildah, which build and run the same images without a daemon.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Open Container Initiative](https://opencontainers.org/)
- Official: [The OCI image specification](https://github.com/opencontainers/image-spec)
- Official: [Podman documentation](https://podman.io/docs)

Topic page: https://opsfolk.com/roadmaps/docker/topics/docker-and-the-oci

## 2. Under the hood

The Linux features a container is made of. Get the idea; the detail can wait.

### Namespaces

What a container can see: its own processes, network, mounts and host name.

A Linux namespace gives a process its own view of one part of the system. The PID namespace gives a container its own process list, where its program is process 1; the network namespace its own interfaces and ports; the mount namespace its own file system; and the user namespace its own users.

Docker creates a set of namespaces for each container. Knowing this explains why `ps` inside a container shows so little, and why two containers can both listen on port 80.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [namespaces(7), in the Linux man pages](https://man7.org/linux/man-pages/man7/namespaces.7.html)

Topic page: https://opsfolk.com/roadmaps/docker/topics/namespaces

### cgroups

What a container can use: limits on CPU, memory and processes.

Control groups limit and count what a group of processes uses: CPU time, memory, I/O and the number of processes. Where namespaces decide what a container sees, cgroups decide how much it may take.

Docker's `--memory` and `--cpus` flags write cgroup limits. A container that goes past its memory limit is killed by the kernel's OOM killer, which is the usual reason a container exits with code 137.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [cgroups(7), in the Linux man pages](https://man7.org/linux/man-pages/man7/cgroups.7.html)
- Official: [Resource constraints, in the Docker documentation](https://docs.docker.com/engine/containers/resource_constraints/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/cgroups

### Union file systems and layers

How an image is a stack of read-only layers with one writable layer on top.

An image is a stack of read-only layers, one for each instruction that changes files. When a container starts, Docker adds a thin writable layer on top and joins them into one file system with a union file system such as overlayfs.

This is why images share layers on disk and in registries, why a file deleted in a later layer still makes the image larger, and why anything a container writes outside a volume is gone when the container is removed.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Storage drivers, in the Docker documentation](https://docs.docker.com/engine/storage/drivers/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/union-file-systems-and-layers

## 3. Getting started

Installing Docker, its parts, and your first containers from ready-made images.

### Installing Docker

Docker Desktop on macOS and Windows, Docker Engine on Linux.

On Linux, install Docker Engine from Docker's own package repository rather than an old distribution package, then add yourself to the `docker` group or use rootless mode. On macOS and Windows, Docker Desktop runs the engine in a small Linux VM and adds a GUI, Compose and Buildx.

Check it works with `docker version`, which shows both the client and the server, and `docker run hello-world`.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Install Docker Engine](https://docs.docker.com/engine/install/)
- Official: [Linux post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/)
- Official: [Docker Desktop](https://docs.docker.com/desktop/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/installing-docker

### Docker's architecture

The CLI, the daemon, containerd and runc, and how a command reaches them.

The `docker` command is a client. It sends each command over a socket to the daemon, `dockerd`, which manages images, networks and volumes, and hands containers to containerd, which starts them with runc.

This split explains a lot: why the CLI can talk to a daemon on another machine, why access to the Docker socket is as good as root on the host, and why Kubernetes can drop Docker and keep containerd.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker architecture, in the overview](https://docs.docker.com/get-started/docker-overview/)
- Official: [The Docker daemon](https://docs.docker.com/engine/daemon/)
- Official: [containerd](https://containerd.io/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/docker-architecture

### Your first containers

docker run, and the life of a container: created, running, stopped, removed.

`docker run` pulls an image if needed, creates a container and starts it. Learn its common flags: `-d` to run in the background, `-it` for an interactive shell, `--name`, `--rm` to remove it when it stops, `-p` to publish a port and `-e` to set a variable.

Then learn the life of a container: `docker ps -a` lists them, `docker stop` and `docker start` stop and restart one, and `docker rm` removes it. A stopped container keeps its writable layer until it is removed.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Running containers](https://docs.docker.com/engine/containers/run/)
- Official: [docker container run reference](https://docs.docker.com/reference/cli/docker/container/run/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/your-first-containers

### Using ready-made images

Running databases and tools from Docker Hub instead of installing them.

Before writing your own image, use other people's. A database for a project is one command: `docker run -d -e POSTGRES_PASSWORD=dev -p 5432:5432 postgres:17`. So is a tool you need once, such as a different version of a language or a CLI, run with `--rm` and thrown away after.

Prefer Docker Official Images and images from verified publishers, and read an image's page for the variables and volumes it expects.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker Hub](https://docs.docker.com/docker-hub/)
- Official: [Trusted content on Docker Hub](https://docs.docker.com/docker-hub/image-library/trusted-content/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/using-ready-made-images

### The Docker CLI

The commands for images, containers, volumes and networks, and cleaning up.

The CLI is grouped by object: `docker image`, `docker container`, `docker volume` and `docker network`, each with `ls`, `inspect` and `rm`. `docker inspect` shows everything Docker knows about an object as JSON, and `docker logs` and `docker exec` are how you look inside a running container.

Images and stopped containers pile up. `docker system df` shows what uses the disk and `docker system prune` removes what nothing uses.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker CLI reference](https://docs.docker.com/reference/cli/docker/)
- Official: [Prune unused Docker objects](https://docs.docker.com/engine/manage-resources/pruning/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/the-docker-cli

## 4. Storage and networking

Data that outlives a container, and how containers reach each other and the world.

### The container's file system

Why what a container writes is lost with it, and where data should go instead.

A container writes to its own thin writable layer. That layer is slow for heavy writes, invisible to other containers, and removed with the container, so a database that keeps its files there loses them when the container is replaced.

Treat containers as disposable and keep state outside them: in a volume, a bind mount, or a service such as a managed database. A tmpfs mount holds files in memory only, for scratch data and secrets that must not reach disk.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Storage, in the Docker documentation](https://docs.docker.com/engine/storage/)
- Official: [tmpfs mounts](https://docs.docker.com/engine/storage/tmpfs/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/container-file-system

### Volumes

Storage that Docker manages and that outlives any container.

A volume is a directory Docker creates and manages, mounted into a container with `-v name:/path` or `--mount`. It outlives the container, can be shared between containers, and is the right place for a database's files.

Learn to create, list, inspect and remove volumes, what happens when an empty volume is mounted over a directory that has files in the image, and how to back one up by mounting it into a throwaway container.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Volumes, in the Docker documentation](https://docs.docker.com/engine/storage/volumes/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/volumes

### Bind mounts

A host directory mounted into a container, for source code and config.

A bind mount puts a file or directory of the host inside the container, as it is. It is how you edit code on your machine and see the change in a running container, and how you hand a container one config file.

It ties the container to the host's paths and permissions: files are owned by the host's user IDs, and a container that runs as root can change them. Use volumes for data, bind mounts for what you edit, and `:ro` when the container only reads.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Bind mounts, in the Docker documentation](https://docs.docker.com/engine/storage/bind-mounts/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/bind-mounts

### Networks

Bridge networks, DNS by container name, and the host and none drivers.

Each container gets its own network namespace. By default it joins the `bridge` network, where it can reach the internet. On a user-defined bridge network, created with `docker network create`, containers also find each other by name through Docker's built-in DNS: an app reaches its database at `db:5432`.

Know the other drivers: `host`, which shares the host's network, `none`, which has none, and `overlay`, which spans several hosts in a Swarm.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Networking overview](https://docs.docker.com/engine/network/)
- Official: [Bridge network driver](https://docs.docker.com/engine/network/drivers/bridge/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/networks

### Publishing ports

Making a container's port reachable from the host and beyond.

A port a container listens on is reachable from other containers on its network, but not from outside, until you publish it: `-p 8080:80` sends the host's port 8080 to the container's port 80.

By default a published port listens on every interface of the host, and on Linux Docker's firewall rules can make it reachable even past a firewall such as ufw. Bind to `127.0.0.1:8080:80` for a port only you should reach.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/)
- Official: [Port publishing and mapping](https://docs.docker.com/engine/network/port-publishing/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/publishing-ports

## 5. Building images

Dockerfiles, the build cache, and images that are small and quick to build.

### Dockerfiles

The instructions that build an image: FROM, COPY, RUN, CMD and the rest.

A Dockerfile is the recipe for an image. `FROM` picks the base, `WORKDIR` sets the directory, `COPY` brings files in, `RUN` runs commands at build time, `ENV` and `ARG` set variables, `USER` picks who runs it, and `CMD` and `ENTRYPOINT` say what starts.

Build with `docker build -t name .`. Learn the difference between `CMD` and `ENTRYPOINT`, and why the exec form, `["node", "server.js"]`, lets your program receive signals and stop cleanly. `docker init` writes a starting Dockerfile for common languages.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Dockerfile reference](https://docs.docker.com/reference/dockerfile/)
- Official: [Dockerfile overview](https://docs.docker.com/build/concepts/dockerfile/)
- Official: [docker init](https://docs.docker.com/reference/cli/docker/init/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/dockerfiles

### The build context

What is sent to the builder, and keeping it small with .dockerignore.

The `.` at the end of `docker build` is the build context: the files the builder may read. `COPY` can only take files from it, and a large context, with `node_modules`, `.git` or build output, makes every build slower.

A `.dockerignore` file leaves files out of the context, as `.gitignore` does for Git. It also keeps secrets such as `.env` files out of an image by accident.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Build context, in the Docker documentation](https://docs.docker.com/build/concepts/context/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/build-context

### Layer caching

Ordering a Dockerfile so that a small change does not rebuild everything.

Each instruction makes a layer, and Docker reuses a layer from cache while nothing it depends on has changed. Once one layer changes, every layer after it is rebuilt.

So order a Dockerfile from what changes least to what changes most: copy the dependency manifest, such as `package.json` and its lock file, install dependencies, and only then copy the source. A code change then skips the install. BuildKit's cache mounts keep a package manager's cache between builds as well.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker build cache](https://docs.docker.com/build/cache/)
- Official: [BuildKit](https://docs.docker.com/build/buildkit/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/layer-caching

### Multi-stage builds

Building in one image and shipping only the result in another.

A multi-stage Dockerfile has several `FROM` lines. An early stage has the compilers and dev dependencies and builds the application; the final stage starts from a small base and copies in only what runs, with `COPY --from=build`.

The image you ship then has no build tools, source or caches: it is smaller, quicker to pull, and has less in it for an attacker to use.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Multi-stage builds](https://docs.docker.com/build/building/multi-stage/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/multi-stage-builds

### Small and lean images

Choosing a base image and keeping only what the program needs.

An image's size is mostly its base. A full distribution image is hundreds of megabytes; a `slim` variant, Alpine, a distroless image or `scratch` for a static binary can be a tenth of that.

Smaller is not everything: Alpine's musl libc can surprise a program built for glibc, and a distroless image has no shell to debug with. Pin the base's version, clean package caches in the same `RUN` that made them, and run one process per container.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Building best practices](https://docs.docker.com/build/building/best-practices/)
- Official: [Docker Hardened Images](https://docs.docker.com/dhi/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/small-and-lean-images

### Multi-platform images (optional)

One tag for amd64 and arm64, for Apple silicon and ARM servers.

An image is built for one CPU architecture. A laptop with Apple silicon builds `arm64` images, and a server is often `amd64`: an image built on one may not start on the other, with an `exec format error`.

`docker buildx build --platform linux/amd64,linux/arm64` builds both and pushes them under one tag, and each machine pulls its own. Use `--platform` on a single build when you only need the server's.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Multi-platform builds](https://docs.docker.com/build/building/multi-platform/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/multi-platform-images

## 6. Registries

Where images are stored and shared, and how to name them.

### Docker Hub

The default registry: pulling, pushing and its limits.

A registry stores images and serves them by name. Docker Hub is the default one: `postgres` means `docker.io/library/postgres`. You push your own with `docker login`, `docker tag` and `docker push`.

Docker Hub limits how often an anonymous or free account may pull, which a busy CI system can reach. Log in from CI, or mirror the images you depend on.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker Hub documentation](https://docs.docker.com/docker-hub/)
- Official: [Build, tag and publish an image](https://docs.docker.com/get-started/docker-concepts/building-images/build-tag-and-publish-an-image/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/docker-hub

### Tags and digests

Naming images so that you know exactly what runs.

A tag is a name that can move: `nginx:1.27` today may be a different image next week, and `latest` is only the tag used when none is given, not the newest. A digest, `nginx@sha256:...`, names one image's content and never changes.

Tag what you build with something that says where it came from, such as a version and the Git commit, never only `latest`. Pin a base image or a deployment by digest when you need the same bytes every time.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [docker image tag reference](https://docs.docker.com/reference/cli/docker/image/tag/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/tags-and-digests

### Other registries

GHCR, ECR, Artifact Registry, ACR, and running your own.

Every major platform has a registry: GitHub Container Registry beside your code, Amazon ECR, Google Artifact Registry and Azure Container Registry beside your cloud. A registry close to where images run is quicker to pull from and uses the platform's own access control.

They all speak the same OCI distribution protocol, so the commands are the same; only the name's host and the login change. CNCF Distribution, the registry Docker Hub grew from, runs your own.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)
- Official: [Amazon ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html)
- Official: [Google Artifact Registry](https://cloud.google.com/artifact-registry/docs)
- Official: [Azure Container Registry](https://learn.microsoft.com/en-us/azure/container-registry/)
- Official: [CNCF Distribution](https://distribution.github.io/distribution/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/other-registries

## 7. Running containers

Configuring a container at run time, keeping it healthy, and Compose for many.

### Configuration at run time

Environment variables, env files and arguments: one image, many settings.

Build one image and configure it when it runs, so the same image goes from test to production. Pass settings as environment variables with `-e` or `--env-file`, or as arguments after the image's name, which replace its `CMD`.

Keep secrets out of the image and out of `ENV` in a Dockerfile: anyone who can pull the image can read them. `docker inspect` shows a container's variables, so a real secret belongs in a file mounted at run time.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Running containers: environment and overrides](https://docs.docker.com/engine/containers/run/)
- Official: [Environment variables in Compose](https://docs.docker.com/compose/how-tos/environment-variables/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/runtime-configuration

### Resources and restart policies

Limiting CPU and memory, and starting a container again when it stops.

Without limits a container may use all of the host's memory and CPU. `--memory` and `--cpus` set limits, and a container that passes its memory limit is killed.

A restart policy says what Docker does when a container exits: `no`, `on-failure`, `always` or `unless-stopped`. With `unless-stopped`, a service comes back after a crash and after the host reboots, and stays stopped when you stop it.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Resource constraints](https://docs.docker.com/engine/containers/resource_constraints/)
- Official: [Start containers automatically](https://docs.docker.com/engine/containers/start-containers-automatically/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/resources-and-restart-policies

### Logs and health checks

Where a container's output goes, and how Docker knows it is working.

A container should write its logs to standard output and standard error, not to files: `docker logs -f` reads them, and a logging driver sends them on. The default `json-file` driver keeps them on disk with no limit unless you set `max-size`.

A running process is not a working service. `HEALTHCHECK` in a Dockerfile, or `healthcheck` in Compose, runs a command such as an HTTP request every few seconds, and `docker ps` shows the container as healthy or unhealthy.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Logging, in the Docker documentation](https://docs.docker.com/engine/logging/)
- Official: [HEALTHCHECK, in the Dockerfile reference](https://docs.docker.com/reference/dockerfile/#healthcheck)

Topic page: https://opsfolk.com/roadmaps/docker/topics/logs-and-health-checks

### Docker Compose

A whole application, its services, networks and volumes, in one file.

Compose describes several containers in a `compose.yaml` file: each service's image or build, its ports, variables, volumes and dependencies. `docker compose up` starts them all on a network of their own, where they find each other by service name, and `docker compose down` removes them.

It is how most projects run a local stack of an app, a database and a cache, and it runs small production setups on one server too. Learn `depends_on` with a health condition, profiles, and override files.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker Compose](https://docs.docker.com/compose/)
- Official: [Compose file reference](https://docs.docker.com/reference/compose-file/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/docker-compose

## 8. Security

Trusting what is in an image, and limiting what a container may do.

### Image security

Trusted bases, scanning for known vulnerabilities, and rebuilding often.

An image carries every package of its base, and their vulnerabilities with them. Start from an official, verified or hardened base, keep it small, and rebuild regularly so that fixes reach you.

Scan images for known vulnerabilities with Docker Scout or a tool such as Trivy or Grype, in CI as well as on your machine, and read the results: a finding in a package your program never loads matters less than one in what it runs.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker Scout](https://docs.docker.com/scout/)
- Official: [Docker Hardened Images](https://docs.docker.com/dhi/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/image-security

### Secrets

Getting a password into a build or a container without leaving it behind.

A secret copied into an image, set with `ENV` or passed as a build `ARG` stays in the image's layers or history, for anyone who pulls it. A secret needed at build time, such as a token for a private package registry, goes in with `RUN --mount=type=secret`, which is never written to a layer.

At run time, mount secrets as files, as Compose's `secrets` do, rather than passing them as variables that `docker inspect` and crash reports show.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Build secrets](https://docs.docker.com/build/building/secrets/)
- Official: [Secrets in Compose](https://docs.docker.com/compose/how-tos/use-secrets/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/secrets

### Runtime security

Running as a non-root user, with fewer capabilities and a read-only file system.

By default a container's process runs as root, and a break out of the container is then root on the host. Set `USER` in the Dockerfile to an unprivileged user, drop the Linux capabilities you do not need with `--cap-drop ALL`, use `--read-only` with a tmpfs for scratch files, and never use `--privileged` for a normal workload.

Access to the Docker socket is root on the host: never mount it into a container you do not trust. Rootless mode runs the daemon itself as an ordinary user.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Docker security](https://docs.docker.com/engine/security/)
- Official: [Rootless mode](https://docs.docker.com/engine/security/rootless/)
- Official: [Seccomp profiles](https://docs.docker.com/engine/security/seccomp/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/runtime-security

## 9. Developer workflow

Docker in daily work: live reload, debugging, tests and CI.

### Live reload

Seeing a code change in a running container without rebuilding it.

Rebuilding an image for every edit is slow. In development, mount your source into the container with a bind mount and let the language's own watcher restart the program, or use Compose Watch, which syncs changed files into the container and rebuilds only when a dependency file changes.

Keep the development setup in a Compose file of its own, so the image you ship is built the way production runs it.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Compose Watch](https://docs.docker.com/compose/how-tos/file-watch/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/live-reload

### Debugging containers

Getting inside a running container, and into one that has no shell.

`docker exec -it <container> sh` opens a shell in a running container, and `docker logs` and `docker inspect` show what it printed and how it was started. A container that exits at once can be started with its entrypoint replaced, `--entrypoint sh`, to look around.

A slim or distroless image has no shell. `docker debug` attaches a toolbox to it without changing the image. To step through code, publish the debugger's port and attach your editor to it.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [docker container exec](https://docs.docker.com/reference/cli/docker/container/exec/)
- Official: [docker debug](https://docs.docker.com/reference/cli/docker/debug/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/debugging-containers

### Tests with containers (optional)

Real databases and services in tests, started and thrown away by the test.

A test against a real Postgres finds what a mock hides. Testcontainers, a library for most languages, starts the containers a test needs, waits until they are ready, and removes them afterwards, so each run starts clean.

Compose does the same for a whole stack: start it, run the suite against it, and take it down.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Testcontainers](https://testcontainers.com/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/tests-with-containers

### Building in CI

Building, tagging, scanning and pushing images from a pipeline.

A pipeline builds the image on each change, tags it with the commit, scans it and pushes it to a registry, so what is deployed is always an image CI built. Keep the build cache between runs, with a registry or the CI system's cache, or every build starts from nothing.

Docker's actions for GitHub Actions log in, set up Buildx for several platforms, and build and push in a few lines.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Continuous integration with Docker](https://docs.docker.com/build/ci/)
- Official: [Docker Build with GitHub Actions](https://docs.docker.com/build/ci/github-actions/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/building-in-ci

## 10. Deploying containers

Where containers run in production, and what comes after Docker.

### Managed container platforms

Running an image without managing servers: Cloud Run, ECS, Fly.io and others.

The simplest way to run an image in production is to hand it to a platform. Google Cloud Run, AWS ECS with Fargate, Azure Container Apps and Fly.io take an image from a registry, run it, scale it and give it an address, and you manage no servers.

Each asks the same of your image: listen on the port it gives you, read configuration from the environment, log to standard output, and start quickly.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Google Cloud Run](https://cloud.google.com/run/docs)
- Official: [Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html)
- Official: [Fly.io](https://fly.io/docs/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/managed-container-platforms

### Kubernetes

The usual next step: running containers across many machines.

Kubernetes runs containers across a cluster of machines: it decides where each one runs, restarts it when it fails, scales it, and connects them with services and load balancing. It runs the same images Docker builds, through containerd.

It is the most common platform for containers at scale and the next step after this roadmap. The Kubernetes roadmap on this site starts where this one ends.

On this site:

- Playground: [Kubernetes cluster](https://opsfolk.com/playgrounds/kubernetes) (60 minutes, premium)

Elsewhere:

- Official: [Kubernetes overview](https://kubernetes.io/docs/concepts/overview/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/kubernetes

### Docker Swarm (optional)

Docker's own way to run services across several hosts.

Swarm mode, built into Docker Engine, joins several hosts into a cluster and runs services on them, with replicas, rolling updates, overlay networks and secrets. A Compose file deploys to it as a stack.

It is far simpler than Kubernetes, and enough for a small cluster, but has a much smaller ecosystem.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Swarm mode](https://docs.docker.com/engine/swarm/)

Topic page: https://opsfolk.com/roadmaps/docker/topics/docker-swarm

### Nomad (optional)

HashiCorp's scheduler for containers and other workloads.

Nomad schedules work across a cluster as Kubernetes does, with a single binary and a smaller set of ideas. It runs Docker containers and also plain programs, Java applications and virtual machines.

It suits teams that already use HashiCorp's tools, or that run more than containers.

Nothing on this site for it yet: coming soon.

Elsewhere:

- Official: [Nomad documentation](https://developer.hashicorp.com/nomad/docs)

Topic page: https://opsfolk.com/roadmaps/docker/topics/nomad

## About this roadmap

This roadmap puts Docker in the order to learn it, from what a container is to running one in production. Each stage builds on the ones before it, so start at the top and move down; a topic marked optional can wait until you need it.

## Who it is for

Developers who want to package and run their applications in containers, and operators and platform engineers on their way to Kubernetes. You should be at ease with a terminal; the first stage says what else helps.

## How to use it

- Open a topic for a few lines on what it is and why it matters here, then follow its links: this site's articles first, then the official documentation.
- Type every command as you read about it. Docker Desktop or Docker Engine on your own machine is all you need.
- Mark a topic as done once you could explain it to a colleague and do it without notes. Your marks stay with your account.
- When you reach the last stage, the Kubernetes roadmap picks up where this one ends.

## FAQ

### How long does it take to learn Docker?

With steady practice, a week or two is enough to run containers, write a Dockerfile and use Compose for a local stack. Building small, secure images and running containers well in production take longer, and come best with experience on a real project.

### Is Docker the same thing as a container?

No. A container is a Linux process isolated with namespaces and cgroups, started from an image in the OCI format. Docker is one set of tools for building and running them; Podman, Buildah and containerd work with the same images.

### Do I need Docker to learn Kubernetes?

You need to know containers: what an image is, how to build one and how a container runs. Docker is the usual way to learn that. Kubernetes itself runs containers through containerd or CRI-O, not Docker, but it runs the images Docker builds.

### Docker Desktop or Docker Engine?

On Linux, Docker Engine runs natively and is free. On macOS and Windows, Docker Desktop runs the engine in a small virtual machine and adds a GUI; check its licence terms if you use it at a larger company.
