误操作删除了varlibdockeroverlay2下的所有⽂件,导致docker
起不来
/var/lib/docker/overlay2 占⽤很⼤,⼿贱 删除了/var/lib/docker/overlay2/ 下的所有⽂件,重启docker,卸载重新安装还是报错
docker: Error response from daemon: open
/var/lib/docker/overlay2/cb7414af6f42ab54e1d3691e516e93a66209d9fa1ab64ebe063e3ec040a05f1c/committed: no such file or directory
docker重启容器命令1.停⽌docker服务
systemctl stop docker
2,删除docekr⽬录,/var/lib/docker 这⼀步会删除所有的镜像,记得先备份出来
rm -rf /var/lib/docker
3,在其他机器上安装docker⽬录拷贝,或者把其他机器上的docker ⽬录直接拷贝,最好⽤内⽹传输快,
最好选择安装容器较少的机器,实验机器删除掉所有的容器和镜像,这样传输快
scp -r /var/lib/docker 192.168.1.122:/var/lib/
4,重启docker
systemctl restart docker
5,重启完发现容器还是没有起来,删除所有的镜像和容器,再重新构建拉取
[root@192 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6647c1997535 ordercenter "/ordercenter" 2 minutes ago Up 2 minutes ordercenter
2d1f15cf13b4 mall "./mall" 17 minutes ago Up 17 minutes mall
c48b0dd484a7 nginx "nginx -g 'daemon of…" 18 minutes ago Up 18 minutes nginx
11f687ded648 dispatchcenter "./dispatchcenter" 19 minutes ago Up 19 minutes dispatchcenter
84cf87dc3652 productcenter "./productcenter" 19 minutes ago Up 19 minutes productcenter
5860ab5d6511 boss "./boss" 20 minutes ago Up 20 minutes boss
e68bf8ce91cf jcsprogramadmin "nginx -g 'daemon of…" 21 minutes ago Up 21 minutes 80/tcp, 0.0.0.0:9601->9601/tcp jcsprogramadmin 9364a4246a6d mariadb "docker-entrypoint.s…" 29 minutes ago Up 29 minutes 0.0.0.0:3307->3306/tcp mysql
449fa183e0ff inventorycenter "/inventorycenter" 2 hours ago Up 29 minutes inventorycenter
a59f52374aa7 go-filestorage "/filestorage" 3 days ago Up 29 minutes
go-filestorage
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论