~fhusson

How to use Docker under WSL

Step 1 - Install Docker Desktop for Windows

Download from the Docker website and launch the setup “Docker Desktop Installer.exe”

Step 2 - Configure Docker Desktop for Windows

In Docker Windows go to Settings / General and check the Expose daemon on tcp://localhost:2375 without TLS

Step 3 - Configure WSL

In WSL shell add to your .bash_profile

# DOCKER (Docker for Desktop)
export DOCKER_HOST=localhost:2375

Step 4 - Test

Then test with

docker run hello-world
Discuss on Twitter