I’m having the same problem.
In Docker for Mac, the problem is that there’s a maximum size (about 60gb) for this file:
~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2. This is where all images, containers, and volumes are stored.
pg_restore is filling that up.
I don’t know that there’s a fix for this.
There’s this workaround, where you create a replacement
Docker.qcow2 file that is allowed to grow larger, but it doesn’t really seem like a good permanent fix: No space left on device error
Here are some relevant links:
You might also be able to work around this by mounting a host directory (e.g. with
-v /path/to/some/host/folder:/var/lib/postgresql/data). This would not store your data in a docker volume, which would keep it from increasing the size of that Docker.qcow2 file. This comes with some extremely poor performance, though, which is discussed here.
I’ve also asked how people get around this issue on StackOverflow.