docker 容器数据存储在主机上的什么位置?
Where is the docker container data stored on the host machine?
在docker中,除了挂载的volume之外,容器数据存放在哪里,直到容器运行。
所以可以说 /usr/local 是卷挂载的,所以它将在主机和容器之间共享。其他所有东西都存储在哪里?
您应该检查您的 docker 容器
docker inspect [ID_CONTAINER]
并检查字段 MergedDir
、LowerDir
和 UpperDir
。 Docker 使用 OverlayFS 文件系统来存储数据。
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.
查看文档 here。
在docker中,除了挂载的volume之外,容器数据存放在哪里,直到容器运行。
所以可以说 /usr/local 是卷挂载的,所以它将在主机和容器之间共享。其他所有东西都存储在哪里?
您应该检查您的 docker 容器
docker inspect [ID_CONTAINER]
并检查字段 MergedDir
、LowerDir
和 UpperDir
。 Docker 使用 OverlayFS 文件系统来存储数据。
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.
查看文档 here。