docker: Error response from daemon: OCI runtime create failed: systemd cgroup flag passed, but sy...

运行docker镜像时出如下错误:

docker: Error response from daemon: OCI runtime create failed: systemd cgroup flag passed, but systemd support for managing cgroups is not available: unknown.

cat daemon.json

{

  "registry-mirrors": ["https://registry.docker-cn.co"],

  "exec-opts": ["native.cgroupdriver=systemd"]

}

因为指定了systemd,导致文件docker 运行镜像失败,

解决方法,去掉

 "exec-opts": ["native.cgroupdriver=systemd"]

重启docker 服务

service docker restart

你可能感兴趣的:(docker: Error response from daemon: OCI runtime create failed: systemd cgroup flag passed, but sy...)