8

In docker, where is the container data, apart from the mounted volume, is stored till the container is running.

So lets say /usr/local is volume mounted, so it would be shared between the host and the container. Where is everything else stored?

mohan08p
  • 5,002
  • 1
  • 28
  • 36
Nagri
  • 3,008
  • 5
  • 34
  • 63

2 Answers2

13

You should inspect your docker container

docker inspect [ID_CONTAINER]

and check for the fields MergedDir, LowerDir and UpperDir. Docker uses OverlayFS file system to store the data.

OverlayFS layers two directories on a single Linux host and presents them as a single directory. These directories are called layers and the unification process is referred to a a union mount. OverlayFS refers to the lower directory as lowerdir and the upper directory a upperdir. The unified view is exposed through its own directory called merged. enter image description here

Check the doc here.

fingerprints
  • 2,751
  • 1
  • 25
  • 45
0

You can run the following command to get container written data

ll `podman inspect ContainerName --format "{{ .GraphDriver.Data.MergedDir }}"`
Ali Hussein
  • 180
  • 2
  • 8