I just had a annoying problem with docker-ce and docker-compose on a Pi. The compose-file had nothing special in it, just a maria-db and some files and volume-mounts to make that persistent on the system.
I’m quite sure that I’ve been running something like that without any problem on a Pi before. Somehow, it did no longer work for me giving a very strange error message:
Error response from daemon: failed to mount /tmp/containerd-mount3460257346: mount source: "overlay", (...) containerd.snapshotter.v1.overlayfs/snapshots/1/fs", err: invalid argument
I googled a lot and asked some AIs to find a solution. I tried different containerd.io-versions as proposed by many people and tried to change the volume-type in the docker-compose file. None of these fixed worked for me somehow.
The working solution for me was to nail the default storage-type “fuse-overlayfs”. This can be done by adding the following data to /etc/docker/daemon.json. If the file does not exist, simple create it.
{
"storage-driver": "fuse-overlayfs"
}
After adding the lines, you need to restart the docker-service by:
service docker restart
...or...
systemctl restart docker
Now try to re-run “docker compose up”, it should work now.
That’s frustrating, I’ve definitely run into similar issues with volume mounts on Raspberry Pi. It’s often a race condition with the container network, isn’t it?
It may be in somes cases. In my case I figured out later that it was due to the fact that NTFS-3G seems to miss some features that the normal “overlayfs” needs. I moved the /var folder on some SSD, that is connected via USB and formatted with NTFS (other FS do not work reliable for some reasons). After switching to fuse-overlayfs, it worked fine. No idea what it does different, but for me it was the game-changer.