Snap and Docker on Ubuntu

So for a long time, I’ve been wondering why I can’t use a locally mounted directory within one of my containers – I’d just get an empty directory on the volume mount point inside the container. A lot of googling yielded nothing, but then when I ran ps -aux | grep -i docker I noticed docker was running via snap.

It then occurred to me that snap has restrictions on what parts of the filesystem it allows it’s ‘snaps’ to read – this indeed was the problem so a quick uninstall of the snapped version of docker and installed via apt fixed the issue once and for all.

Key search terms for future me/anyone else: docker volume empty docker-compose volume empty.