Skip to content

Docker

Docker is an open-source platform that packages applications into containers, providing the tooling to build, ship and run them consistently across environments.

Definition

What it is

Docker is not "containers". Containers are an OS-level primitive that predates it (chroot in 1979, FreeBSD jails in 2000, cgroups in 2006). Docker is the product that made containers usable by normal engineers: a CLI, a daemon, an image format, a registry, and a set of conventions that turned a kernel feature into a developer workflow.

Scope note. "Docker" is often used to mean three different things: Docker the company, Docker the platform (CLI + daemon + registry), and Docker the container format (which is now governed by the OCI). This entry covers the platform.

Why it matters

Before Docker, packaging a Python app for production meant documenting apt packages, Python versions, pip pins, env vars and system libraries in a wiki page that nobody read. After Docker, it meant writing a Dockerfile that was versioned, tested and reproduced the same way in CI and on any developer laptop.

Docker vs Podman vs containerd

Aspect

Docker

Podman

containerd

Daemon required

Yes (dockerd)

No (daemonless)

Yes (containerd)

Rootless by default

No (can be)

Yes

No

Build tool

docker build (BuildKit)

podman build (Buildah)

External (BuildKit)

Compose support

Native

Yes (via podman-compose)

No

Drop-in replacement

—

Yes (alias docker=podman)

No

Best for

Dev workflows, Docker Desktop

Security-conscious CI

Underlying runtime

The Docker workflow

graph LR
  DF[Dockerfile] -->|docker build| IMG[Image]
  IMG -->|docker push| REG[Registry]
  REG -->|docker pull| IMG2[Image]
  IMG2 -->|docker run| C[Container]
  IMG -->|docker run| C
  style DF fill:#FFF3E0
  style C fill:#E8F5E9

Timeline

  1. 2013 — Solomon Hykes demos Docker at PyCon US.

  2. 2014 — Docker 1.0 ships.

  3. 2015 — Docker donates the container format to the OCI.

  4. 2017 — Docker rebrands its open-source project as Moby.

  5. 2019 — Docker Enterprise sold to Mirantis.

  6. 2023 — Docker Desktop license changes (BSL for large companies).

  7. 2024 — Docker 27 ships; Podman 5 ships.

How to use Docker well

Docker that ages well

  1. Multi-stage builds

    Build in one stage, copy only the artifact into the final image. Saves hundreds of MB.

  2. Non-root user

    USER appuser in the final stage. Root containers are host-kernel risks.

  3. Pinned base images

    FROM ubuntu:24.04@sha256:... instead of FROM ubuntu:latest. Latest moves; digests do not.

  4. Small base images

    alpine or distroless for the final stage. Smaller = faster pull, fewer CVEs.

  5. `.dockerignore`

    Exclude node_modules, .git, *.log. A copy that includes .git multiplies image size by 10.

  6. Healthcheck

    HEALTHCHECK CMD curl -f http://localhost/ || exit 1. Kubernetes uses it; CI uses it.

Common failures

Origin

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud.

— Docker, *What is Docker?*, 2014 (paraphrase of Docker's early documentation)
2008 · dotCloud (predecessor company) founded
2013 · Docker launches at PyCon
2014 · Docker 1.0
2015 · OCI donations
2023 · Docker Desktop license change (BSL)

Evidence

FAQ

Docker vs Podman?

Podman is daemonless and rootless by default. alias docker=podman mostly works for basic usage; Docker Compose is often the gap.

Can Docker run rootless?

Yes, since 2019 (dockerd-rootless-setuptool.sh install). It uses user namespaces.

Docker on Mac/Windows?

It runs a Linux VM (Docker Desktop) because containers share the Linux kernel. On macOS, Colima and OrbStack are alternatives.

Is Docker free?

Docker Engine is free (Apache 2.0). Docker Desktop is free for personal and small businesses; large companies need a paid license since 2023.

Docker vs containerd?

containerd is the runtime; Docker is a platform built on top of it. You can run containerd without Docker; Docker uses containerd.

Connections

DockercontainerideploymentContainerDockerfileContainer Container Container podmanKubernetes

● broader ● narrower ● related

Used in the garden

Sources

Etymology

Origin: borrowed

  • docker (noun): a port worker who loads and unloads ships; metaphor for software that loads and unloads containers

Semantic network

DockercontainerideploymentContainerDockerfileContainer Container Container podmanKubernetes

● broader ● narrower ● related

Used in the garden

Sources