Hi, i recently ran into more and more issues with ...
# rancher-desktop
h
Hi, i recently ran into more and more issues with running docker desktop with wsl2, so i'm trying to get away from docker desktop, because i suspect resource management issues. First the setup: I still have docker desktop installed but not running, since this is just a test to see if rancher desktop works better. I have a wsl2 with a Ubuntu 24.04 distribution running. The distro itself doesn't contain a docker installation, but uses the docker desktop integration. I shut down docker desktop, so as expected the docker command is no longer available in the distribution. I start ranger desktop, use the dockerd (moby) container engine and have my distribution checked under the WSL preferences, so it exposes the docker socket, or at least is supposed to... When then trying to run docker in my wsl cli I still get the message, that the docker command can't be found. I tried shutting down wsl and restarting it and i then checked the rancher logs, specifically the moby log. The is the log i get:
Copy code
2025-06-14T06:02:39.107Z: Failed to run docker system info after 11 failures (will retry): {
  stdout: 'Client:\n' +
    ' Version:    28.1.1-rd\n' +
    ' Context:    default\n' +
    ' Debug Mode: false\n' +
    ' Plugins:\n' +
    '  buildx: Docker Buildx (Docker Inc.)\n' +
    '    Version:  v0.24.0\n' +
    '    Path:     C:\\Program Files\\Rancher Desktop\\resources\\resources\\win32\\docker-cli-plugins\\docker-buildx.exe\n' +
    '  compose: Docker Compose (Docker Inc.)\n' +
    '    Version:  v2.36.2\n' +
    '    Path:     C:\\Program Files\\Rancher Desktop\\resources\\resources\\win32\\docker-cli-plugins\\docker-compose.exe\n' +
    '  model: Docker Model Runner (Docker Inc.)\n' +
    '    Version:  v0.1.23\n' +
    '    Path:     C:\\Users\\jozze\\.docker\\cli-plugins\\docker-model.exe\n' +
    '  scout: Docker Scout (Docker Inc.)\n' +
    '    Version:  v1.18.1\n' +
    '    Path:     C:\\Users\\jozze\\.docker\\cli-plugins\\docker-scout.exe\n' +
    '\n' +
    'Server:\n',
  stderr: 'error during connect: this error may indicate that the docker daemon is not running: Get "<http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.49/info>": open //./pipe/docker_engine: The system cannot find the file specified.\n'
}
In the docker.log i see that the daemon should have been initialized
Copy code
time="2025-06-14T08:02:31.946224299+02:00" level=info msg="Daemon has completed initialization"
time="2025-06-14T08:02:31.986202965+02:00" level=info msg="API listen on /mnt/wsl/rancher-desktop/run/docker.sock"
time="2025-06-14T08:02:31.986203016+02:00" level=info msg="API listen on /var/run/docker.sock.raw"
time="2025-06-14T08:02:31.986216271+02:00" level=info msg="API listen on /var/run/docker.sock"
the rancher-desktop distribution is running and the *-data distro is stopped. Did anybody encounter this before?
e
I recommend using a different distro for the two use-cases, so the docker-desktop-integration doesn't get in your way. But if you don't want to do that, start DD and turn off the WSL integration.
w
what does
docker context ls
show in the client? seems like the context might just be set to the docker desktop option vs the rancher desktop
👍 1
h
While docker desktop is running from my wsl2 environment (if i understood that correctly): default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock desktop-linux Docker Desktop npipe:////./pipe/dockerDesktopLinuxEngine When Rancher Desktop is running the docker command is just not available.
e
You have to enable the WSL2 integrationm with that distro in Rancher Desktop. As I said, I'd use another distro to experiment instead of mixing the two up. If you don't have the docker client, you can install it using your distro's package manager.
h
I enabled this in Rancher Desktop. I thought rancher would do it similar to docker desktop, that it provides the socket to my distribution, but you might be right, that docker desktop is to possesive about that. I will try setting up a second WSL distribution and see if it works better, when i never enabled docker desktop for it.
e
I would expect that, but DD actually links in there the docker client and compose, etc. Maybe RD doesn't. But you can install those yourself in the distro. But yes, separate distro means you can keep all the things separate. At least as you're finding your way around.
h
yeah and if i see improvements with RD i can just swap over. last time DD and/or WSL destroyed my containers so i have to freshly setup most things anyways. Might as well do it on 2 distributions.
👍 1
e
Are you doing something that requires kubernetes?
I'm duty-bound to tell you that on WSL2 docker-ce (the open-source Linux version of Docker) is the easiest and by far most reliable thing to use.
h
na, just some basic networked containers with docker-compose.
e
Both DD and rancher are far more complex and both are less reliable. (I'm maintainer of DDEV, which can use all of the above on multiple platforms)
h
i'm working on a legacy system that uses some kind of monolyth god container ^^ in there everything happens like nginx with dev vhosts, mariadb and so on that is setup with an ansible playbook. It sits in a docker network with other satelite containers for smaller services like pdf rendering and so on or as a backend for other CMS. At some point i might work on spliting that apart, but for now I just want to make it run together with some bigger containers that need more resources. And that combination already crashed my WSL twice. That's why i'm lookking for ways to take overhead out of it before i work on trying to set stuff up without that huge legacy container.
e
That's what you would be doing here. One WSL2 distro with docker-ce and everything else. But just telling you about the simplest environment.
👍 1
h
ok, will look into it