How to enable AUFS in Debian?

When I try to install docker using:

curl -sSL https://get.docker.com/ | sh 

I get a message:

Note: the current kernel is not supported by the linux-image-extra-virtual virtual package. We do not have AUFS support. Consider installing the linux-image-virtual kernel and linux-image-extra-virtual packages to support AUFS.

However, no packages exist on Debian Jessie:

 # apt-get install linux-image-virtual linux-image-extra-virtual Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-image-virtual E: Unable to locate package linux-image-extra-virtual 

What am I missing here?

+5
source share
3 answers

aufs is not supported by modern kernels, so you should go to overlayfs from aufs. Just restart the docker daemon with the option:

 --storage-driver=overlay2 

(or add this option to / etc / default / docker)

On some systems, you must add file processing / etc / default / docker to start the procedure by creating /etc/systemd/system/docker.service with the content:

 [Service] EnvironmentFile=-/etc/default/docker ExecStart= ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ $BLOCK_REGISTRY \ $INSECURE_REGISTRY \ $DOCKER_OPTS 

More here

Run

 systemctl daemon-reload 

for the changes to take effect.

Attention! All your images become inaccessible. If you want to save them, just save and reload them. You can find a good description here.

UPD I changed overlay to overlay2 because it solves a bit more problems than described here

+10
source

In fact, installing jessie gives you the kernel that comes with aufs support. I assume you upgraded the version of a higher kernel using jessie-backports, which is not a standard jessie setting.

This has been tested with the current Debian jessie 8.7.1 amd64 and kernel 3.16.0.4.

 # cat /etc/debian_version 8.7 # dpkg --get-selections | grep linux-image linux-image-3.16.0-4-amd64 install linux-image-amd64 install # dpkg -L linux-image-3.16.0-4-amd64 | grep aufs /lib/modules/3.16.0-4-amd64/kernel/fs/aufs /lib/modules/3.16.0-4-amd64/kernel/fs/aufs/aufs.ko 

So, to answer your question:

You can reinstall Debian Jessie or down-grade into the default kernel, and you have jessie with aufs support.

To install aufs on Debian 9, aka Debian, you just need to create apt-get install aufs-dkms . Unfortunately, this is not currently available for jessie-backports.

In our company, we run our docker hosts with jessie aufs setup, and everything works flawlessly.

+4
source

You can try

 sudo apt-get install linux-image-extra-$(uname -r) 

to install an extended kernel version that must contain AUFS support.

-1
source

All Articles