Finally found the problem. Turns out I had Docker installed with Snap and there's a limitation where Snap can't access /tmp: https://github.com/canonical/docker-snap/issues/34#issuecomment-812045834
I had to uninstall Docker from Snap and reinstall using apt-get and now it works: https://docs.docker.com/engine/install/ubuntu/