Docker + WSL is a Linux developers dream came true for anyone using a Windows platform at home.
Following tutorials like this and that are great, but they aren't flawless, most of miss out on the important part.
In order to get bind mounts working you NEED to mount you WSL directory at /
These tutorials gloss over that, but it's required in my case.
[automount]
enabled = true
root = / # REQUIRED
options = "metadata,umask=22,fmask=11"
mountFsTab = false
After adding this to your /etc/wsl.conf
, close all the WSL terms and start a new one up.
You should then be able to use docker-compose
to start a container that use $PWD:/app
.
Docker 💛 WSL