docker 报错

Docker 启动或者重启时报以上两个错误:
● Error starting daemon: Devices cgroup isn’t mounted
● Error response from daemon: Cannot restart container rsnmp_v4: OCI runtime create failed: container_linux.go:349: starting container process caused “process_linux.go:297: applying cgroup configuration for process caused “mountpoint for devices not found””: unknown
问题都是 cgroup 未挂载。可以通过下面命令脚本修复。

bash -c "$(curl -sS https://gitee.com/lwmacct/web-vscode-shell/raw/main/workspace/shell/centos/docker/cgroupfs-mount.sh)"
bash -c "$(curl -sSL https://raw.githubusercontent.com/tianon/cgroupfs-mount/master/cgroupfs-mount)"

参考链接:https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐