【踩坑记录】docker启动报错mountpoint for cgroup not found

具体报错信息:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:281: applying cgroup configuration for process caused \"mountpoint for cgroup not found\"": unknown.
ERRO[0000] error waiting for container: context canceled

原因:

docker需要使用cgroup进行资源控制,依赖cgroupfs,如果报以上错误,需要手动mount cgroup。

手动配置命令(systemd):

  • mkdir /sys/fs/cgroup/systemd
  • mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

共有以下类型:

  • vim /proc/cgroups

 

 需要全部挂载,挂在完成后使用以下命令检测,挂载信息与上图对应:

  • mount -t cgroup

 重新执行docker container启动命令,ok,已解决

 

 

posted @ 2023-01-18 16:23  马儿跑  阅读(2717)  评论(0编辑  收藏  举报