添加后:
-g /vagrant/lib/docker
我尝试重新启动 dockerd 时出现这些错误:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-08-03 21:20:50 UTC; 1s ago
Docs: https://docs.docker.com
Process: 6495 ExecStart=/usr/bin/dockerd -g /vagrant/lib/docker -H fd:// (code=exited, status=1/FAILURE)
Main PID: 6495 (code=exited, status=1/FAILURE)
CPU: 61ms
Aug 03 21:20:50 badger systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Aug 03 21:20:50 badger systemd[1]: Failed to start Docker Application Container Engine.
Aug 03 21:20:50 badger systemd[1]: docker.service: Unit entered failed state.
Aug 03 21:20:50 badger systemd[1]: docker.service: Failed with result 'exit-code'.
Aug 03 21:20:50 badger systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Aug 03 21:20:50 badger systemd[1]: Stopped Docker Application Container Engine.
Aug 03 21:20:50 badger systemd[1]: docker.service: Start request repeated too quickly.
Aug 03 21:20:50 badger systemd[1]: Failed to start Docker Application Container Engine.
Aug 03 21:20:50 badger systemd[1]: docker.service: Unit entered failed state.
Aug 03 21:20:50 badger systemd[1]: docker.service: Failed with result 'exit-code'.
以下是systemd:
的配置文件的摘录[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -g /vagrant/lib/docker -H fd://
lsb_release:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
答案 0 :(得分:0)
vagrant@vagrant:~$ mount | grep vagrant
/dev/mapper/vagrant--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mapper/vagrant--vg-root on /var/lib/docker/aufs type ext4 (rw,relatime,errors=remount-ro,data=ordered)
vagrant on /vagrant type vboxsf (rw,nodev,relatime)
该图表无法在/vagrant
上运行。您可以选择任何其他文件夹,它应该工作。问题是因为这与普通文件夹不同,它在主机和VM之间共享和同步。
您可以看到类型为vboxsf。此安装的文件夹的行为方式不同。因此,在此安装的docker卷和docker图表也表现得很奇怪。我不知道究竟有什么不同,但我知道它不起作用。如果有人知道确切的区别,那么请做评论