overlay2: layers and copy-on-write
Select an icon to see what it is.
Step 3 of 6
A new file goes to the upper layer
Writing a file that does not exist in the image creates it directly in the upper layer. The image layers are never touched. Only this container sees the file.
$ docker exec web sh -c 'echo hi > /hello.txt'Upper layer
/var/lib/docker/overlay2/<container>/diff/hello.txt