docker diff
Lists the files a container has added (A), changed (C) or deleted (D) compared with its image.
In more detail
It shows exactly what is in the container writable layer, which is useful for spotting a program writing where it should not. Paths are listed relative to the container root, and a D entry is recorded as a whiteout, not a real removal from the image.
Example
docker diff note-twoRelated terms
- writable layer — The thin layer on top of an image where a running container writes its changes.
- copy on write — A rule where a shared file is only copied at the moment someone changes it.
- whiteout file — A marker in a higher layer that says a file from a lower layer has been deleted.
Taught in
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers