docker启动报错修改docker目录后报错Failed with result‘service-start-limit-hit‘,修改容器目录

//停Idocker服务

systemctl stop docker.socket
systemctl stop docker

//挂载网络共享

sudo mount 192.168.50.30:/test /raid

//开机自动挂载

vim /etc/fstab
192.168.50.30:/test /share nfs

//修改docker镜像日录

vim /etc/docker/daemon. json
{
“bip”: “128.128.0.1/16”,
“insecure-registries”: [“192.168.50.23:11010”],
“data-root”: “/raid/docker”
}

//启动docker报错:

docker.socket: Failed with result ‘service start limit-hit’.
解决方法,overlay2日录必须为空
这里重点说明一下,出现这个启不动docker服务的时候,要用journalctl -xe查看服务日志。
‘service start limit-hit’.不同的错误代码,解决方案也不同。
我这里需求是主机磁盘容量太小,必须挂载到指定的共享目录,如果不修改到指定目录是可以正常启动,修改目录就不行,删掉overlay2是一种方法。

//修改docker的接口服务

vim /lib/systemd/system/docker.service
ExecStart-/usr/bin/dockerd H fd://–containerd=/run/containerd/containerd.sock -H 0.0.0.0:2375

//启动docker

systemctl daemon-reload
systemctl restart docker

猜你喜欢

转载自blog.csdn.net/myhappyandy/article/details/131551574