Docker Desktop 2 Unix Socket Not Available on Alpine WSL 2
Meanwhile, in our Ubuntu distribution:
ps aux | grep docker-desktop-proxy
And in Alpine?
Troubleshooting issue: https://github.com/docker/for-win/issues/5096#issuecomment-572730439
Given the lack of information about how the WSL image is built and bootstrapped, some light reverse engineering is in order:
sudo find / -name docker-desktop
..
./wsl/docker-desktop
./var/lib/docker-desktop
What’s in /wsl
:
What’s in /wsl/docker-desktop
:
…
On Alpine WSL, /var/run
is devoid of any life forms:
However, there is a /wsl/docker-desktop/docker-desktop-proxy
file:
But it seems like something’s amok with it’s execution. It is a binary file, so there’s no way to inspect it’s content’s from the shell.
To wit, bind mounts are working inside Alpine. It’s just the Docker socket that is not.
And I don’t know how to manually execute the proxy to see if there’s any error output.
—
Not directly related to WSL, obviously, but…
What were again the perms on Ubuntu WSL’s socket?
The TCP option.
Trying to use Docker Desktop’s port 2375 as a fallback.
Is the Docker Engine TCP port 2375
even open?
Looks like so.
What about IP address?
Looks like host.docker.internal
is still available on DD 2.2:
It belongs to Windows Wi-Fi adapter:
Can be pinged directly using 192.168.1.235
from Ubuntu WSL, but not via hostname host.docker.internal
:
Reachable from Alpine too:
It is also responsive via telnet on Alpine. Previously tyring using localhost
or 127.0.0.1
would not work (like it used to on WSL version 1):
I think I might have a winner here, then.
Change Alpine’s ~/.bashrc
from:
to:
export DOCKER_HOST=tcp://192.168.1.235:2375
Hmm. It just blanks out.
It seems WSL also throws in it’s own network stack:
The WSL address is pingable from both Ubuntu and Alpine WSLs:
But will it work.
Nope. It hangs as well.
And after a day and a half of trying to use Alpine to connect to Docker Desktop, I have to throw in the towel and temporarily switch to Ubuntu WSL full-time.