For a docker-compose project, i'm running into the dreaded speed issue of volume mounts from the Windows host system on WSL2. I'm therefore trying to transfer my files to the unix filesystem of WSL2 and mount them from there.
I've therefore:
- copied over the repository from
C:/srv/repo
using explorer to//wsl$/srv/repo
- instructed Docker Compose to volume mount
/srv/repo:/var/www
but... the directory is coming up empty. Because mounting /mnt/host/c/srv/repo
also does not work, I'm thinking that I somehow have to instruct docker-compose to use the unix filesystem. I can mount /
and then get some kind of strange empty filesystem that resembled Unix but does not share files with the //wsl$/
filesystem. If I exec into the WSL, I can see the files sitting there ready to be volume shared.
One idea I had was using the WSL shell to launch the docker-compose stack from the WSL distro directly, but it does not appear to have any docker executable, only returning:
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
See https://docs.docker.com/docker-for-windows/wsl/ for details.
Any idea's what I'm overlooking? Any pointer is much appreciated!