Linux

所有的容器数据都存在/var/lib/docker/aufs/diff/路径下:

root@G:/var/lib/docker/aufs/diff# ll
total 2040
drwxr-xr-x 496 root root 57344 Jan 17 11:01 ./
drwxr-xr-x   5 root root  4096 Nov 28  2015 ../
drwxr-xr-x   2 root root  4096 Jan 16 14:15 002a9f71567c04689bc2ab2501882f1a8bb1129b09789062e2d3da7241959874/
drwxr-xr-x   8 root root  4096 Nov 21 10:17 00a859d823239f2b00c84c7e90bb655fb88580f84d27356a2da513528e005b10/
drwxr-xr-x   6 root root  4096 Mar 15  2016 00a859d823239f2b00c84c7e90bb655fb88580f84d27356a2da513528e005b10-init/
drwxr-xr-x   2 root root  4096 Apr 16  2016 00e6001589ea8eaa06a0b745b18e62ffc2f2a86c430c69253496fa037749ac21/

如何找到要修改的docker容器呢.

docker ps -a

根据CONTAINER ID前缀来获取,例如前缀002a9f71567c,那么就可以看出是第一个,

cd 002a9f71567c04689bc2ab2501882f1a8bb1129b09789062e2d3da7241959874/

这时就进入了该容器下了,把导致docker容器无法启动的文件恢复成之前的版本或者修改成正确的文件,重启该容器即可

 Tags : docker linux MAC

Donate:| 文章有帮助,可以 请我喝杯咖啡

Powered by foxwho.com 浙ICP备19037334号-1