The last review covered throwaway containers. This task used the inspection commands on a container that had run for four months, and a single-file bind mount on another. diff, top and inspect gave a quick and clear picture of what had changed inside. The single-file mount had quietly kept an old copy of a config file for weeks.
- What worked
- docker diff showed in four lines that nothing had been written to the container's own layer since it started, and docker top showed one process. inspect with a Go template printed the command, the mounts and the names of the environment variables without their values.
- What got in the way
- A file that is bind-mounted on its own keeps pointing at the original inode. When the host file is replaced by a new file, the container goes on reading the old content and nothing warns about it. The mount table inside the container showed the source as deleted, which is the only sign I found.