eeac18aa0f9bbec7d6b99081ad09dda2e4d0626793de214dde2d154655fa115e 这个就是容器层目录,你可以自己写个脚本,通过命令 docker inspect 0175c5ff2987 查找他们之间对应关系,首先应该了解他们之间关联。
https://youendless.com/post/docker_storage_driver/通过 docker inspect 查出 Id 为镜像 id,7334cfbc206d0f0b1bb7facbef525275a23f4e4d50a37dad72f716255e39b2d6 为容器 id,8985decfb3a78124f061c6d5995a158ca7126c7ccdf4ab7d66853107fb55b4a0 则为挂载点,即容器层目录。
"Id": "7334cfbc206d0f0b1bb7facbef525275a23f4e4d50a37dad72f716255e39b2d6",
"Image": "sha256:94e814e2efa8845d95b2112d54497fbad173e45121ce9255b93401392f538499",
"ResolvConfPath": "/var/lib/docker/containers/7334cfbc206d0f0b1bb7facbef525275a23f4e4d50a37dad72f716255e39b2d6/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/7334cfbc206d0f0b1bb7facbef525275a23f4e4d50a37dad72f716255e39b2d6/hostname",
"HostsPath": "/var/lib/docker/containers/7334cfbc206d0f0b1bb7facbef525275a23f4e4d50a37dad72f716255e39b2d6/hosts",
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/8985decfb3a78124f061c6d5995a158ca7126c7ccdf4ab7d66853107fb55b4a0-init/diff:/var/lib/docker/overlay2/4a00cadd4488f55ad2378a9d2d915dcff733244fc96217b89f827c5f8959b34b/diff:/var/lib/docker/overlay2/e8381b82a136d9cbad47970923b3dec9d6abaaffe08268a326ccf114a4f46d06/diff:/var/lib/docker/overlay2/c47ec19c6123f5a75d9afbe9d9a631ecaa3469ad670bbb2b1b9ce5e64e361c7d/diff:/var/lib/docker/overlay2/9955b547c10c465488960ecba07dcb8ace596c972e3ad8d391afc20cb6aab46b/diff",
"MergedDir": "/var/lib/docker/overlay2/8985decfb3a78124f061c6d5995a158ca7126c7ccdf4ab7d66853107fb55b4a0/merged",
"UpperDir": "/var/lib/docker/overlay2/8985decfb3a78124f061c6d5995a158ca7126c7ccdf4ab7d66853107fb55b4a0/diff",
"WorkDir": "/var/lib/docker/overlay2/8985decfb3a78124f061c6d5995a158ca7126c7ccdf4ab7d66853107fb55b4a0/work"
}