List of Figures

Chapter 1. Welcome to Docker

Figure 1.1. What happens after running docker run

Figure 1.2. Running docker run a second time. Because the image is already installed, Docker can start the new container right away.

Figure 1.3. A basic computer stack running two programs that were started from the command lin

Figure 1.4. Docker running three containers on a basic Linux computer system

Figure 1.5. Dependency relationships of example programs

Figure 1.6. Example programs running inside containers with copies of their dependencies

Figure 1.7. Left: A malicious program with direct access to sensitive resources. Right: A malicious program inside a container.

Chapter 2. Running software in containers

Figure 2.1. The three containers that you’ll build in this example

Figure 2.2. A fleet of web server containers and related monitoring agents

Figure 2.3. The state transition diagram for Docker containers

Figure 2.4. Each WordPress and agent container uses the same database and mailer.

Chapter 3. Software installation simplified

Figure 3.1. Flow of topics covered in this chapter

Figure 3.2. Step 1—software identification

Figure 3.3. The Docker image repository name

Figure 3.4. Step 2—locating repositories

Figure 3.5. Parts of the pull and save subcommands

Figure 3.6. Step 3—understanding how software is installed

Figure 3.7. The full lineage of the two Docker images used in section 3.3.1

Chapter 4. Working with storage and volumes

Figure 4.1. Storage devices attached to a filesystem tree at their mount point

Figure 4.2. Example of common container storage mounts

Figure 4.3. Host files shared as a bind-mount volumes

Figure 4.4. Sharing files between containers with a volume

Figure 4.5. Key steps in creating and recovering data persisted to a volume with Cassandra

Chapter 5. Single-host networking

Figure 5.1. Processes use the same interface and are uniquely identified in the same way that multiple people might use the same mailbox.

Figure 5.2. The path of a message in a postal system and a computer network

Figure 5.3. A bridge interface connecting two distinct networks

Figure 5.4. The default local Docker network topology and two attached containers

Chapter 6. Limiting risk with resource controls

Figure 6.1. Eight-sided containers

Figure 6.2. Relative weight and CPU shares

Figure 6.3. Three containers and their shared memory pools; producer and consumer share a single pool.

Figure 6.4. Root versus root—a security drama

Chapter 7. Packaging software in images

Figure 7.1. Building an image from a container

Figure 7.2. A simple file write example on a union filesystem from two perspectives

Figure 7.3. Reading files that are located on different layers

Figure 7.4. Various file addition, change, and deletion combinations over a three-layered image

Figure 7.5. An image is the collection of layers produced by traversing the parent graph from a top layer.

Figure 7.6. A visual representation of repositories

Figure 7.7. Two tagging schemes (left and right) for the same repository with three images. Dotted lines represent old relationships between a tag and an image.

Chapter 8. Building images automatically with Dockerfiles

Figure 8.1. Relationship between ENTRYPOINT and CMD

Figure 8.2. Multistage Docker builds

Chapter 9. Public and private software distribution

Figure 9.1. The image distribution spectrum

Figure 9.2. The simplest side of the distribution spectrum and the topic of this section

Figure 9.3. Private registries in the image distribution spectrum

Figure 9.4. Interactions between the Docker client, daemon, local registry container, and local storage

Figure 9.5. Docker image distribution over custom infrastructure

Figure 9.6. A typical manual distribution workflow with producer, transport, and consumers

Figure 9.7. An FTP publishing infrastructure

Figure 9.8. Using existing infrastructure to distribute image sources

Chapter 10. Image pipelines

Figure 10.1. Generic artifact build pipeline

Figure 10.2. A Docker image build pipeline

Figure 10.3. Image build pattern maturity

Figure 10.4. Image hierarchy for multi-stage build example

Figure 10.5. Continuous delivery with unique tags

Figure 10.6. Configuration image per environment

Figure 10.7. Tag and publish image release with semantic versioning

Chapter 11. Services with Docker and Compose

Figure 11.1. Initializing a swarm node

Figure 11.2. Creating your first service

Figure 11.3. The swarm node automatically creates a container to run the service software.

Figure 11.4. Timeline of Swarm reactions to changes in service specification and state

Figure 11.5. Timeline of automated deployment of an updated service definition to a Docker swarm

Figure 11.6. Declarative processing loop

Figure 11.7. Docker network topology, service virtual IP addresses, and load balancing

Chapter 12. First-class configuration abstractions

Figure 12.1. Timeline of application changes

Figure 12.2. Applications depend on configurations.

Figure 12.3. The greetings service supports common and environment-specific configuration via files.

Figure 12.4. Docker services depend on config resources.

Figure 12.5. Copy on deploy

Figure 12.6. The first secret problem

Figure 12.7. The Docker swarm cluster’s chain of trust

Figure 12.8. Provide location of secret file to read as environment variable

Chapter 13. Orchestrating services on a cluster of Docker hosts with Swarm

Figure 13.1. Swarm cluster deployment

Figure 13.2. Docker Swarm resource types

Figure 13.3. Logical architecture of example application

Figure 13.4. Communication path for Docker control plane

Figure 13.5. Swarm network components for example app

Figure 13.6. Routing an HTTP request to a service task

Figure 13.7. Layered view of overlay networks

Figure 13.8. Swarm network components for example app

Figure 13.9. The test Swarm cluster

Figure 13.10. Event reconciliation loop

Figure 13.11. API service tasks are everywhere