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 defaults 0 0

//修改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

llowing directives are specified both as a flag and in the configuration file: hosts: (from flag: [fd://], from file: [unix:///var/run/docker.sock tcp://0.0.0.0:2375]) Mar 11 20:49:10 localhost systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE Mar 11 20:49:10 localhost systemd[1]: docker.service: Failed with result 'exit-code'. Mar 11 20:49:12 localhost systemd[1]: docker.service: Scheduled restart job, restart counter is at 3. Mar 11 20:49:12 localhost systemd[1]: docker.service: Start request repeated too quickly. Mar 11 20:49:12 localhost systemd[1]: docker.service: Failed with result 'exit-code'. Mar 11 20:49:12 localhost systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'. Mar 11 20:53:14 localhost dockerd[46860]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [fd://], from file: [unix:///var/run/docker.sock tcp://0.0.0.0:2375]) Mar 11 20:53:14 localhost systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE Mar 11 20:53:14 localhost systemd[1]: docker.service: Failed with result 'exit-code'. Mar 11 20:53:16 localhost systemd[1]: docker.service: Scheduled restart job, restart counter is at 1. Mar 11 20:53:16 localhost dockerd[46864]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [fd://], from file: [unix:///var/run/docker.sock tcp://0.0.0.0:2375]) Mar 11 20:53:16 localhost systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE Mar 11 20:53:16 localhost systemd[1]: docker.service: Failed with result 'exit-code'. Mar 11 20:53:18 localhost systemd[1]: docker.service: Scheduled restart job, restart counter is at 2. Mar 11 20:53:18 localhost dockerd[46869]: unable to configure the Docker daemon with file /etc/docke
03-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值