我正在尝试使用配置文件/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)