一、首先查看容器配置
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 #接下去就是容器的根/目录了