免费系统上 Docker 中的 Arch linux 空间不足

免费系统上 Docker 中的 Arch linux 空间不足

archlinux:base我正在Docker For Mac 中在完全空的 Mac 文件系统上构建图像(没有空格问题)。

df -h在构建时在 Dockerfile 的早期打印,显示如下:

#6 [ 3/34] RUN df -h
#6 sha256:813a64bb126c8e765889bb10075a6c5acdcb4e734b83bf8737a8ddb927e987bd
#6 0.227 Filesystem      Size  Used Avail Use% Mounted on
#6 0.227 overlay          59G  5.3G   51G  10% /
#6 0.227 tmpfs            64M     0   64M   0% /dev
#6 0.227 shm              64M     0   64M   0% /dev/shm
#6 0.227 /dev/vda1        59G  5.3G   51G  10% /etc/resolv.conf
#6 0.227 tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
#6 0.227 tmpfs           2.0G     0  2.0G   0% /proc/acpi
#6 0.227 tmpfs           2.0G     0  2.0G   0% /sys/firmware
#6 DONE 0.3s

在下一个命令中,我执行 pacman -Syyu,它更新软件包。在此期间,我得到了这个:

#7 28.09 downloading fish-3.1.2-2-x86_64.pkg.tar.zst...
#7 28.86 checking keyring...
#7 29.01 checking package integrity...
#7 30.57 loading package files...
#7 30.65 checking for file conflicts...
#7 30.66 checking available disk space...
#7 30.71 error: Partition /etc/resolv.conf is mounted read only
#7 30.71 error: Partition /etc/hosts is mounted read only
#7 30.71 error: not enough free disk space
#7 30.71 error: failed to commit transaction (not enough free disk space)
#7 30.73 Errors occurred, no packages were upgraded.
#7 ERROR: executor failed running [/bin/sh -c pacman -Syyu sudo fish --noconfirm]: exit code: 1

但是,我没有看到任何空间问题。有可能与 相关吗tmpfs

答案1

我实际上认为最后一个错误有点转移注意力

我认为这个问题是:https://github.com/moby/buildkit/issues/1267

这里也参考一下:https://stackoverflow.com/questions/63652551/docker-build-vs-docker-run-dont-behave-the-same

相关内容