Docker hello world 显示“设备上没有剩余空间”

Docker hello world 显示“设备上没有剩余空间”

该命令docker run hello-world给出了这个错误: System error: write /dev/cgroup/docker/<hash>/cgroup.procs: no space left on device

它是 Debian Wheezy,带有来自反向移植的 3.16 内核。(之前从 squeeze 升级)

/dev 被挂载为 10MB 的 devtmpfsudev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1019797,mode=755)

Docker 是否有我需要更改的配置选项?

完整输出:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world 
535020c3e8ad: Pull complete 
af340544ed62: Already exists 
library/hello-world:latest: The image you are pulling has been verified.
Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:d5fbd996e6562438f7ea5389d7da867fe58e04d581810e230df4cc073271ea52
Status: Downloaded newer image for hello-world:latest
WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.
Error response from daemon: Cannot start container 0ecfcae485a362fffcbf40e26db61356be62a8093f8bcea5dc37147f1a5a47e0: [8]     System error: write /dev/cgroup/docker/0ecfcae485a362fffcbf40e26db61356be62a8093f8bcea5dc37147f1a5a47e0/cgroup.procs: no space left on 

Docker 信息:

docker info
Containers: 7
Images: 5
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 19
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.0-0.bpo.4-amd64
Operating System: Debian GNU/Linux 7 (wheezy)
CPUs: 8
Total Memory: 7.796 GiB
Name: ...
ID: WZ7K:E5CI:YYXJ:GXL6:Q2NL:5S27:NL4T:6KMM:Z4PF:4N56:PZI3:NPMY
WARNING: No memory limit support
WARNING: No swap limit support

数据:

Filesystem              Type      Size  Used Avail Use% Mounted on
rootfs                  rootfs    107G   41G   64G  39% /
udev                    devtmpfs   10M     0   10M   0% /dev
tmpfs                   tmpfs     799M  244K  799M   1% /run
/dev/disk/by-label/\x2f ext3      107G   41G   64G  39% /
tmpfs                   tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                   tmpfs     2.4G     0  2.4G   0% /run/shm
/dev/sda1               ext3       88M   51M   33M  61% /boot
cgroup                  tmpfs     3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/disk/by-label/\x2f ext3      107G   41G   64G  39% /var/lib/docker/aufs

答案1

添加cgroup_enable=内存交换账户=1到你的 grub 并重新启动操作系统。

$ sudo vim /etc/default/grub

GRUB_CMDLINE_LINUX="cgroup_enable=内存交换账户=1"

$ sudo 更新 grub

$ sudo 重启

参考

答案2

“\df /dev/cgroup/” 表示什么?文件系统可能是“vserver”吗?在这种情况下,vserver 和 docker 之间可能会不兼容(它们使用相同的底层技术)。

在我的系统上,仅 \df 不会显示它,但只有通过明确提供 df 的路径它才会显示。

它也会显示在“cat /proc/mounts”中。

相关内容