Here is my setup:
Windows 10 PRO - build 19041.153
- insider program - slow ringUbuntu 18.04LTS
subsystem in WSL2 modeDocker for desktop 2.2.0.4
- enabled WSL2 integration with my Ubuntu subsystem
I am currently forced to use Windows for development, so I became a Microsoft insider member and installed ubuntu with WSL2 mode. Docker desktop supports integration for WSL2, so I tried it...
For a week it worked flawlessly. Today after a PC restart, I can't get docker running again. Ubuntu can see the injected binaries from Docker desktop, but it can't connect to windows hosted docker daemon anymore.
When I call in the WSL terminal docker info
it returns
$ docker info
Client:
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
or with docker-compose up
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
What I've tried already:
- expose daemon without TLS with envs like
DOCKER_HOST=localhost:2375
,DOCKER_HOST=tcp://localhost:2375
,DOCKER_HOST=127.0.0.1:2375
,DOCKER_HOST=tcp://127.0.0.1:2375
=> same result - uninstall Docker desktop and install previous version
- turn off windows firewall
I really, really need this to work. Thanks for any ideas. Weirdest thing is it worked yesterday and I didn't make any changes in system from then...
unset DOCKER_HOST
? Sounds weird, but that's what did it for me. – Surfboatwsl -l -v
. I accidentally changed the wsl version from 2 to 1 a long time before and did not remember it anymore.... if its the same for youwsl --set-version (distro name) 2
and afterwards restart docker-desktop will fix fix it. – Melchizedek