Chapter 4. Docker Fundamentals
In this chapter, we’ll expand on the fundamental Docker concepts. We’ll start by looking at the overall architecture of Docker, including the technologies it builds on. This is followed by more in-depth sections on building Docker images, networking containers, and handling data in volumes. The chapter concludes with an overview of the remaining Docker commands.
Tip
As this chapter contains a lot of reference material, you may prefer to skim the main points and move onto Chapter 5, referring back to this chapter as needed.
The Docker Architecture
In order to understand how best to use Docker and some of the more unusual behavior in Docker, it’s good to have a rough understanding of how the Docker platform is put together under the covers.
In Figure 4-1, we can see the major components of a Docker installation:
-
At the center is the Docker daemon, which is responsible for creating, running, and monitoring containers, as well as building and storing images, both of which are represented on the right of the diagram. The Docker daemon is launched by running
docker daemon, which is normally taken care of by the host OS. -
The Docker client is on the lefthand side and is used to talk to the Docker daemon via HTTP. By default, this happens over a Unix domain socket, but it can also use a TCP socket to enable remote clients or a file descriptor for systemd-managed sockets. Because all communication must be done over HTTP, it’s easy to connect to remote ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access