小编Gas*_*Gas的帖子

在daemon.json中配置主机后无法启动docker

我正在尝试使用配置文件/etc/docker/daemon.json在ubuntu 16.04中配置docker(版本17.03.1-ce)来添加主机:

{
  "debug": true,
  "hosts": ["tcp://0.0.0.0:1234", "unix:///var/run/docker.sock"],
  "dns"  : ["8.8.8.8","8.8.4.4"]
}
Run Code Online (Sandbox Code Playgroud)

当我尝试重新启动docker时...它失败了

#service docker restart
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
Run Code Online (Sandbox Code Playgroud)

systemctl status上观看docker.service:

Starting Docker Application Container Engine...
docker-slave-ubuntu-build dockerd[24806]: 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: …
Run Code Online (Sandbox Code Playgroud)

service configuration docker ubuntu-16.04

6
推荐指数
2
解决办法
4967
查看次数

标签 统计

configuration ×1

docker ×1

service ×1

ubuntu-16.04 ×1