I get this error when I try to build a docker file
error creating aufs mount to /var/lib/docker/aufs/mnt
/6c1b42ce1a98b1c0f2d2a7f17c196221445f1054566065d4c607e4f1b99930eb-init:
invalid argument
What does it mean? How do I fix it?
I get this error when I try to build a docker file
error creating aufs mount to /var/lib/docker/aufs/mnt
/6c1b42ce1a98b1c0f2d2a7f17c196221445f1054566065d4c607e4f1b99930eb-init:
invalid argument
What does it mean? How do I fix it?
I just had a similar issue on Lubuntu (Ubuntu 4.15.0-20-generic) with Docker CE 18.03. None of the described options helped.
It appears that latest docker versions use the overlay2 storage driver. However some applications require aufs. Thus a possible fix might be to simply use this docker guide to change the storage driver to aufs (simply replace "overlay2" with "aufs") as in this guide.
I have removed
/var/lib/docker/aufs/diff
and got the same problem:It solved by running the following commands:
I had some unresolved errors after removing
/var/lib/docker/aufs
, which a couple extra steps cleared up.To add to @benwalther answer, since I lack the reputation to comment:
A similar issue arose while I was using Docker in Windows:
The problem occurred after having removed a volume from the image's
Dockerfile
, rebuilding the image and then rebooting the PC. Maybe this is a common cause?I managed to solve the problem by clicking
Docker
->Settings
->Reset
->Reset to factory defaults...
All my images were subsequently lost but that didn't matter for me. I also figured that removing the VM disk image (the path to which can be found under the
Advanced
tab inSettings
) could solve the issue. I haven't tried this approach however.Unfortunately on my system I could not resolve this with the above answers. The docker administration kept remembering a certain file in the aufs layer that it couldn't reach anymore. Other solutions didn't work either. So if this is an option for you, you could try the following fix: uninstall/purge
docker
anddocker-engine
:Then make sure everything from
/var/lib/docker
is removed.After that install docker again.
AUFS is unable to mount the docker container filesystem.
This is either because: the path is already mounted - or - there's a race condition in docker's interaction with AUFS, due to the large amount of existing volumes.
To solve this, try the following:
restart the docker service or daemon and try again.
check
mount
for aufs mounted on any paths under/var/lib/docker/aufs/
. If found, stop docker, thenumount
them (need sudo).example:
mount
none on /var/lib/docker/aufs/mnt/55639da9aa959e88765899ac9dc200ccdf363b2f09ea933370cf4f96051b22b9 type aufs (rw,relatime,si=5abf628bd5735419,dio,dirperm1)
then
sudo umount /var/lib/docker/aufs/mnt/55639da9aa959e88765899ac9dc200ccdf363b2f09ea933370cf4f96051b22b9
sudo rm -rf /var/lib/docker/aufs
. You will lose any existing stopped containers and all images. But this is just about guaranteed to solve the problem.