Docker: 启动容器错误:无法加载 AUFS 模块

5

在使用 vagrant 登录到我的 ubuntu 上的 ec2 实例后,我尝试运行以下命令:

sudo docker run -i -t ubuntu echo 'hello',但是我收到了以下错误信息:

Error starting container da3124903fc4: Unable to load the AUFS module

我该如何加载这个 AUFS module

我已经安装了 aufs-tools


你正在运行哪个版本的Ubuntu、发行版和内核?cat /etc/lsb-release ; uname -r 可以告诉你。 - Alister Bulman
Ubuntu 13.04,3.8.0-19-generic - Rose Perrone
4个回答

6

这有助于我安装aufs,运行以下命令:

sudo apt-get install lxc wget bsdtar curl
sudo apt-get install linux-image-extra-$(uname -r)
sudo modprobe aufs

干杯!!


安装额外的软件现在已经过时,请参见https://askubuntu.com/questions/153023/what-is-the-linux-image-extra-package-for-and-do-i-need-it。 - ElToro1966

3

我运行了apt-get purge lxc-docker并使用以下命令重新安装:

curl https://get.docker.io | sudo sh

我得到了以下错误,但安装仍然继续并完成了。

Ensuring basic dependencies are installed...
Looking in /proc/filesystems to see if we have AUFS support...
Ahem, it looks like the current kernel does not support AUFS.
Let's see if we can load the AUFS module with modprobe...
FATAL: Module aufs not found.
Ahem, things didn't turn out as expected.

当我运行docker run ubuntu echo hello时,结果是hello,所以看起来一切都很好。

我已经添加了HTTPS URL @XavierShay! - jackyalcine

3
对于那些在2021年及以后遇到类似问题(如我一样在调试docker-ce 20.*时),这篇来自docker文档的简介可能会有所帮助:

如果可能的话,overlay2是推荐使用的存储驱动程序。在首次安装Docker时,默认使用overlay2。以前,当aufs可用时,默认使用aufs,但现在不再是这种情况。如果您想在新的安装中使用aufs,则需要显式配置它,并且您可能需要安装额外的软件包,例如linux-image-extra。请参见aufs

来源:https://docs.docker.com/storage/storagedriver/select-storage-driver/#docker-engine---community


0
实际解决方案,帮助我解决了在我的Debian 10系统上的问题。
apt-get install aufs-dkms
modprobe aufs
dpkg --configure -a

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接