【问题标题】:I have no overlayfs driver in /var/lib/docker我在 /var/lib/docker 中没有 overlayfs 驱动程序
【发布时间】:2017-01-27 21:44:57
【问题描述】:

我的版本是 Ubuntu 16.04,内核版本是 4.4.0 generic

我想使用overlayfs驱动,所以我先通过教程成功安装docker:http://ciplogic.com/index.php/blog/107-docker-with-overlayfs-on-ubuntu-14-04

但是我安装docker后发现/var/lib/docker/下没有覆盖目录,只有aufs等目录。

这是我的 docker 版本:

客户:

版本:1.12.1

API 版本:1.24

Go 版本:go1.6.3

Git 提交:23cf638

建成时间:2016 年 8 月 18 日星期四 05:33:38

操作系统/Arch:linux/amd64

服务器:

版本:1.12.1

API 版本:1.24

Go 版本:go1.6.3

Git 提交:23cf638

建成时间:2016 年 8 月 18 日星期四 05:33:38

操作系统/Arch:linux/amd64

有人知道在 docker 中设置覆盖驱动程序的任何想法吗?非常感谢

【问题讨论】:

    标签: docker ubuntu-16.04


    【解决方案1】:

    afaik 有必要明确告诉 docker-daemon 它应该使用哪个存储驱动程序。必要的开关是

    --storage-driver=overlay
    

    要使用 systemd,您需要将 /lib/systemd/system/docker.service 复制到 /etc/systemd/system/docker.service 并更改 ExecStart-param:

    root@pc / # cat /etc/systemd/system/docker.service 
    [Unit]
    Description=Docker Application Container Engine
    Documentation=https://docs.docker.com
    After=network.target docker.socket
    Requires=docker.socket
    
    [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 --storage-driver=overlay -H fd://
    ExecReload=/bin/kill -s HUP $MAINPID
    # Having non-zero Limit*s causes performance problems due to accounting overhead
    # in the kernel. We recommend using cgroups to do container-local accounting.
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity
    # Uncomment TasksMax if your systemd version supports it.
    # Only systemd 226 and above support this version.
    #TasksMax=infinity
    TimeoutStartSec=0
    # set delegate yes so that systemd does not reset the cgroups of docker containers
    Delegate=yes
    # kill only the docker process, not all processes in the cgroup
    KillMode=process
    
    [Install]
    WantedBy=multi-user.target
    

    问候

    【讨论】:

      猜你喜欢
      • 2022-06-24
      • 2018-01-11
      • 2016-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多