Docker

About Docker… #

I’ve been using docker since like 2017 (jumped in late, I know).
Still, when asked, I find it hard to explain what it is and what it does.
This page is my attempt to answer :)

What is docker #

Docker is used to manage and run containers.
Docker is a set of tools.

  • Docker CLI
  • Docker Daemon (dockerd)
    • REST API
    • container runtime (containerd, runC)

Docker adopted the Open Container Initiative (OCI) standards.
Docker images are now OCI-compliant images, and Docker’s runtime components (like containerd and runC) are OCI-compliant runtimes.

What are containers #

Containers are isolated, lightweight, and portable units that package an application and its dependencies.

Unlike virtual machines, containers do not include an entire guest operating system; they share the host’s OS kernel. This shared kernel is what makes them significantly lighter and faster to start than VMs.

Containers use Linux kernel features - namespaces and cgroups (control groups).

Snippets #

View healthcheck logs:

docker inspect --format "{{json .State.Health }}" $CONTAINER | jq