2017-08-03 112 views
0

工作增加後:Dockerd --graph/- 數據根似乎並不與systemd

-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 
+1

嘗試一個非'/ vagrant /'目錄,它應該工作 –

+0

@TarunLalwani你是對的。它不適用於'/ vagrant /'目錄。 – jnbdz

回答

0
[email protected]:~$ 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工作。你可以選擇任何其他文件夾,它應該工作。問題是因爲這與普通文件夾不同,它在主機和虛擬機之間共享和同步。

正如您可以看到類型爲vboxsf。此掛載的文件夾行爲不同。因此,裝載在這上面的碼頭容器和碼頭圖也表現怪異。我不知道究竟有什麼不同,但我知道這是行不通的。如果有人知道確切的區別,然後做評論

+0

它們將參數從'--graph'改爲'--data-root'。所以你是對的。我決定讓我的VirtualBox磁盤更大。 – jnbdz