Docker 00:00:01 What starts when the bakery opens? The bakery deploys the same receipt printer at two counters. Each counter should run the same program, with its own settings and a reliable place for receipts. Follow the first container from an image name to a running Linux process. docker run nginx becomes a request to the daemon. The image is not here. Missing layers come from the registry and are checked. The daemon prepares the writable layer, network and mounts. In this Linux example the runtime applies the configured isolation and resource controls, then starts the container's main process. Containers on this host share the host kernel. Only the container, its shim and the daemons remain. The image supplies the filesystem layers. The running container also has configuration and a writable layer. A container can stop even while its image remains available to launch again. 00:00:55 A one-line receipt change At lunchtime someone changes just the line that prints the bakery's address. The build separates dependency manifests from frequently edited application source. Predict whether the expensive install step must run again. Nothing is cached. All five steps run. The first steps have the same inputs and are reused. Dependency inputs match the earlier build, so a reusable cache entry can supply the install result. This step's input is new. It runs. This time the manifest changes. A prior cache result for the other manifest no longer describes the requested installation. Changing a dependency manifest invalidates the corresponding install step and downstream work in this dependency chain. Design the build inputs around what actually changes together. 00:01:43 Two counters share the printed recipe Both containers read one image. Change the first counter's configuration file. The point of the experiment is to inspect what the second counter observes, and what survives when the first container is removed. Both containers read the same files from the same layers. With the overlay driver illustrated here, changing an existing file first creates a writable copy for this container. B still sees the original. A deletion in the writable view can hide the image file in this container. It does not erase the bytes in the original read-only layer. A's layer disappears with both changes. B and the image are unchanged. A small file change can require copying a whole file under a copy-on-write storage driver. The image layer still exists, and the two containers remain independently configurable. 00:02:32 The printer pauses under a burst A receipt queue grows just as the program's average memory rises. CPU throttling and memory exhaustion produce different symptoms. The bakery sets limits and observes the actual enforcement rather than guessing from latency. The container is far below both limits. In this configured CPU period, the process uses its allowance early. Runnable work may wait until allowance is available again. A leak fills the limit. Under memory pressure, a process can be killed. Inspect the container status and kernel evidence to distinguish this from an application shutdown. A restart policy starts it again. Find the leak or size the heap to the container. A restart can restore a process but leave the leak untouched. Compare throttling, working memory and restarts before increasing the limits or rewriting the receipt renderer. 00:03:26 Replace a counter without losing receipts Imagine the deployment removes the old container and starts the revised receipt printer. Which directory should hold the day's orders? Test this with disposable sample records before trusting the deployment. Here the database has written its sample rows into the container's own writable layer. The team removes the container and starts a newer image. A named volume holds the files. Any container can mount it, and backups go elsewhere. A named volume can outlive a replacement container. It still needs a compatible application, explicit backup and a tested restore. The bakery can now rebuild the image without treating the temporary container layer as its order book.