docker无法启动容器… cpu.shares:没有这样的文件或目录

前端之家收集整理的这篇文章主要介绍了docker无法启动容器… cpu.shares:没有这样的文件或目录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

当我尝试运行docker镜像时,我收到以下错误

  1. Error response from daemon: Cannot start container {id}:
  2. [8] System error: open /sys/fs/cgroup/cpu,cpuacct/init.scope/system.slice/docker-{id}.scope/cpu.shares: no such file or directory

/ sys / fs / cgroup / cpu,cpuacct /已挂载,但init.scope中没有system.slice目录

泊坞版:

  1. Client version: 1.7.1
  2. Client API version: 1.19
  3. Go version (client): go1.4.2
  4. Git commit (client): 786b29d
  5. OS/Arch (client): linux/amd64
  6. Server version: 1.7.1
  7. Server API version: 1.19
  8. Go version (server): go1.4.2
  9. Git commit (server): 786b29d
  10. OS/Arch (server): linux/amd64

核心:

  1. Linux christian-pc 4.1.0-2-amd64 #1 SMP Debian 4.1.6-1 (2015-08-23) x86_64 GNU/Linux

坐骑(摘录):

  1. tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
  2. cgroup on /sys/fs/cgroup/systemd type cgroup (rw,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
  3. pstore on /sys/fs/pstore type pstore (rw,relatime)
  4. cgroup on /sys/fs/cgroup/freezer type cgroup (rw,freezer)
  5. cgroup on /sys/fs/cgroup/devices type cgroup (rw,devices)
  6. cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,cpu,cpuacct)
  7. cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,net_cls,net_prio)
  8. cgroup on /sys/fs/cgroup/blkio type cgroup (rw,blkio)
  9. cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,perf_event)
  10. cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,cpuset)
  11. systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
  12. debugfs on /sys/kernel/debug type debugfs (rw,relatime)
  13. mqueue on /dev/mqueue type mqueue (rw,relatime)
  14. hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
  15. /dev/sda1 on /boot type ext2 (rw,relatime)
  16. /dev/mapper/christian--pc--vg-home on /home type ext4 (rw,data=ordered)
  17. binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
  18. tmpfs on /run/user/1000 type tmpfs (rw,size=814904k,mode=700,uid=1000,gid=1000)
  19. fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
  20. gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,user_id=1000,group_id=1000)

很感谢任何形式的帮助.

最佳答案
我遇到了同样的问题,我发现了你的问题以及https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798778,“systemd 226的init.scope打破了docker.io 1.7.1~dfsg1-1.”

其中Dmitry Smirnov说你可以在/ etc / default / docker中添加–exec-opt native.cgroupdriver = cgroupfs到DOCKER_OPTS.

为我工作.

猜你在找的Docker相关文章