docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.85k stars 285 forks source link

mounting /usr/lib/wsl to /tmp/docker-desktop-<USER>/usr/lib/wsl: no such file or directory" #14230

Closed Spongman closed 1 week ago

Spongman commented 1 month ago

Description

image

error spotted in wslbootstrap log: "[2024-07-30T17:56:34.491117392Z][wsl-bootstrap][F] mounting /usr/lib/wsl to /tmp/docker-desktop-<USER>/usr/lib/wsl: no such file or directory"

Reproduce

  1. start Docker Desktop

Expected behavior

it doesn't crash

docker version

Client:
 Version:           27.1.1
 API version:       1.46
 Go version:        go1.21.12
 Git commit:        6312585
 Built:             Tue Jul 23 19:57:57 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux
error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.46/version": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.

### docker info

```bash
Client:
 Version:    27.1.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.14
    Path:     C:\Program Files\Docker\cli-plugins\docker-desktop.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.11.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.46/info": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
errors pretty printing info


### Diagnostics ID

4E7C1E7C-A5C7-4467-994F-C5918D1E5DE4/20240730181005

### Additional Info

_No response_
Spongman commented 1 month ago

I have tried completely uninstalling Docker Desktop, removing all traces of files left behind, and reinstalling.

my win10 updates are up-to-date.

same error.

this all worked fine yesterday.

Spongman commented 1 month ago

ok, i found the 'cause'. i had the following in my %USERPROFILE%\.wslconfig :

[wsl2]
gpuSupport = false

which causes the /usr/lib/wsl directory to not exist in the docker-desktop wsl instance.

I have had this setting in my .wslconfig file for years now, and it has never been an issue before.

this is a REGRESSION in Docker Desktop: it has never required gpuSupport to be enabled until whatever recent upgrade broke this.

please fix this, and add this setting to your test matrix.

HamletHakobyan commented 1 month ago

Quick fix.

wsl -d docker-desktop mkdir /usr/lib/wsl

niemyjski commented 4 weeks ago

This didn't solve the issue for me.

danilomo commented 4 weeks ago

"wsl -d docker-desktop mkdir /usr/lib/wsl"

Worked for me too!

I also have this entry in my config file:

"gpuSupport = false"

which I had to put there because WSL was making my computer very slow and this config was fix at that time.

lorenrh commented 1 week ago

4.34.0 has been released with a fix for this issue, more information o the release notes.

I'll be closing this issue, but if the problem persists please open a fresh issue!