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

时间:2013-09-04 06:51:16

标签: ubuntu amazon-ec2 vagrant docker

使用ssh上的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

3 个答案:

答案 0 :(得分:6)

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

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

干杯!!

答案 1 :(得分: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,所以看起来一切正常。

答案 2 :(得分:0)

对于那些在 2021 年及以后遇到这个问题的人,比如我在调试 docker-ce 20.* 问题时,docker 文档中的这个简介可能会有所帮助:

<块引用>

如果可能,overlay2 是推荐的存储驱动程序。首次安装Docker时,默认使用overlay2。以前,aufs 在可用时默认使用,但现在不再如此。如果您想在以后的新安装中使用 aufs,您需要明确配置它,并且您可能需要安装额外的软件包,例如 linux-image-extra。见aufs。

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