在创builddaemon.json之后,docker服务不会启动
执行以下步骤时出现以下错误消息
● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2017-08-30 09:21:52 CEST; 13s ago Docs: https://docs.docker.com Process: 11581 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) Main PID: 11581 (code=exited, status=1/FAILURE) CPU: 28ms Aug 30 09:21:52 debian systemd[1]: docker.service: Failed with result 'exit-code'. Aug 30 09:21:52 debian systemd[1]: docker.service: Service hold-off time over, scheduling restart. Aug 30 09:21:52 debian systemd[1]: Stopped Docker Application Container Engine. Aug 30 09:21:52 debian systemd[1]: docker.service: Start request repeated too quickly. Aug 30 09:21:52 debian systemd[1]: Failed to start Docker Application Container Engine. Aug 30 09:21:52 debian systemd[1]: docker.service: Unit entered failed state. Aug 30 09:21:52 debian systemd[1]: docker.service: Failed with result 'exit-code'. Aug 30 09:22:00 debian systemd[1]: docker.service: Start request repeated too quickly. Aug 30 09:22:00 debian systemd[1]: Failed to start Docker Application Container Engine. Aug 30 09:22:00 debian systemd[1]: docker.service: Failed with result 'exit-code'.
- 我在VirtualBox上创build了一个新的Ubuntu 64位虚拟机。
- 然后我使用安装脚本来安装docker: https : //get.docker.com/
- 安装成功后,我尝试将守护程序configuration为
10.0.2.15:2375
以便将其转发给我的主机操作系统 - 我运行
nano /etc/docker/daemon.json
来创build文件 -
我粘贴下面的例子
{ "debug": true, "tls": false, "tlscert": "/var/docker/server.pem", "tlskey": "/var/docker/serverkey.pem", "hosts": ["tcp://10.0.2.15:2375"] }
-
然后我跑
service docker restart
- 运行
service docker status
显示我上面的消息