查看当前Driver

[root@master ~]# docker info |grep "Cgroup Driver"
 Cgroup Driver: cgroupfs

修改配置:

mkdir -p /etc/docker
cat > /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ],
  "data-root": "/data/docker"
}
EOF

重启生效:

systemctl restart docker
docker info |grep "Cgroup Driver"

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code