- Install Docker engine in both WSL1 and WSL2.
- In WSL1: Create, configure and use new context:
$ docker context create wsl2daemon $ docker context update --docker "host=tcp://[::]:2375" wsl2daemon $ docker context use wsl2daemon
- In WSL2: Configure the daemon in
/etc/docker/daemon.json
:{ "hosts": ["tcp://[::]:2375"] }
- Start (or restart) Docker daemon in WSL2.
- Run
docker info
in WSL1 (you might need to wait a bit for daemon in WSL2 to fully initialize). - Profit 💸
Created
February 23, 2025 16:47
-
-
Save smuuf/cf84ee9fcaaef40920ce3f12230a5e4a to your computer and use it in GitHub Desktop.
WSL1 docker client with WSL2 docker daemon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment