DEV Community

arielro85
arielro85

Posted on • Updated on

DevContainers in WSL with Docker and without Docker Desktop

A time ago I decided to migrate all my code development to VSCode DevContainers.
As a WSL user, I was facing some issues when tried to create the containers from VsCode.
Visual Studio code was not able to find the Docker binary cause it was searching it in Windows and not in the WSL instance.
To fix this in VScode Settings configure the following ones:

dev.containers.dockerPath set to /usr/bin/docker
dev.containers.executeInWSL must be checked
dev.containers.executeInWSLDistro only required if you have more than 1 distro in WSL.

With the configurations mentioned above you should now be able to create DevContainers within WSL with docker binary installed.

Hope this little article help improving your coding skills.

Top comments (0)