Docker can't modify base image's filesystem, but can't copy it. How can store its changes during container usage? I see that it stores files under /var/lib/docker, but how can store filesys' changes without modifying it? What is the methodology?
1 Answer
It does store changes through a new filesystem layer, because of its copy-on-write mechanism:
Those changes disappear after a docker rm (unless you docker commit right after a docker stop)
If you want some persistence, you would need to use a volume or use a data volume container.
When doing a docker run, you can mount a volume from your host or mount one from a data container.
