Docker Container Diff

docker container diff

This command inspects changes to files or directories on a container’s filesystem. So we can get an idea about which all files or directories got added or deleted to the container layer.


$docker container diff CONTAINER

Docker has 3 symbols for identifying changes in its diff output

A: A file or directory was created

C: A file or directory was changed

D: A file or directory was deleted


So let's list all the containers and run the diff command-


You can even watch a container in one terminal while doing some changes in the file system in another terminal as below. I have two terminals -

Watch terminal-