Skip to content

Chapter 2 of 7

Docker Architecture, Installation, and Core CLI

Under the hood, Docker is built around a long-running background process called the Docker daemon, often invoked as dockerd. The daemon is the engine that creates and manages Docker objects such as images, containers, networks, and volumes, and it exposes its functionality through a REST API. Client tools, including the docker command-line interface, communicate with the daemon over this API to perform actions on the user's behalf.

Installing Docker on a Linux system such as Ubuntu involves a few well-defined steps. You add Docker's official GPG key, configure the package repository, refresh the package index, and then install the docker-ce package using sudo apt install docker-ce. After installation, the Docker service is started and enabled so that the daemon runs automatically on boot, ready to accept requests from the CLI.

Once Docker is installed, a small set of commands is enough to inspect and download images. The docker images command, also written as docker image ls, lists all images stored locally along with their repository names, tags, image IDs, and sizes. To obtain an image from a registry like Docker Hub, you use docker pull followed by the image name, which downloads the image and stores it locally so it can be turned into a container. The docker inspect command is a general-purpose debugging tool that returns detailed JSON information about any Docker object, whether that object is a container, an image, a volume, or a network.

All chapters
  1. 1Foundations of Containers and Docker
  2. 2Docker Architecture, Installation, and Core CLI
  3. 3Building Images with Dockerfile
  4. 4Running and Managing Containers
  5. 5Data Persistence and Networking
  6. 6Docker Compose and Orchestration with Swarm
  7. 7Security and Troubleshooting

Drill it

Reading is not remembering. These come from the Docker And Containers deck:

Q

What is a container in computing?

A container is a lightweight, standalone, executable package that includes everything needed to run a piece of software, such as code, runtime, libraries, and d...

Q

What is containerization?

Containerization is a virtualization method that packages an application and its dependencies into a container, enabling consistent deployment across different...

Q

What is Docker?

Docker is an open-source platform that automates the deployment, scaling, and management of applications inside containers using containerization technology.

Q

What is the difference between a container and a virtual machine?

Containers share the host OS kernel and are lightweight, starting in seconds, while virtual machines include a full guest OS, making them heavier and slower to...