一、首先檢視容器配置
docker inspect 容器id
#查到MergedDir
"MergedDir": "/var/lib/docker/overlay2/2897c18dd38a69768f9ccb913d57a8d2a19eed347bcf6d05dc3cc85153ac566e/merged",
"UpperDir": "/var/lib/docker/overlay2/2897c18dd38a69768f9ccb913d57a8d2a19eed347bcf6d05dc3cc85153ac566e/diff",
"WorkDir": "/var/lib/docker/overlay2/2897c18dd38a69768f9ccb913d57a8d2a19eed347bcf6d05dc3cc85153ac566e/work",
二、切換目錄
#切換至目錄merged
cd /var/lib/docker/overlay2/2897c18dd38a69768f9ccb913d57a8d2a19eed347bcf6d05dc3cc85153ac566e/merged
#接下去就是容器的根/目錄了