docker.service: Failed with result ‘exit-code‘

docker.service: Failed with result 'exit-code'

查看日志:

$ sudo dockerd --debug

看到是我们的daemon.json文件有问题 

打开daemon.json

sudo vim /etc/docker/daemon.json

改为

{
  "registry-mirrors": ["http://hub-mirror.c.163.com"]
}

重启

sudo service docker restart

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、付费专栏及课程。

余额充值