Open NikitaMelikhov opened 2 years ago
Wondering if /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/1a8c01243b0f51b6ce3beec294968223f7e139c951cc48880b4f36f9a5e28e01
is some ephemeral / unique location that's generated for a new WSL2 session 🤔 (so when you restart, it creates a new ID, and the old path no longer exists)
I'm not too familiar with WSL2, but am asking around a bit if someone knows.
Wondering if
/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/1a8c01243b0f51b6ce3beec294968223f7e139c951cc48880b4f36f9a5e28e01
is some ephemeral / unique location that's generated for a new WSL2 session 🤔 (so when you restart, it creates a new ID, and the old path no longer exists)
Not sure how can i check that and what's even worse how can i fix it
Does anyone have any ideas?
+1
+2
+3 Same problem here.
+4
+5
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 30 days.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
/remove-lifecycle stale
I encountered same issue today on Win 10 and WSL2, and it was resolved when I updated Docker Desktop to 4.16.3 (96739).
During update, the VM was restarted by docker, and I suspect that this might helped to fix issue. Just for reference, here are some output that I run after updating docker:
> C:\Windows\system32 > wsl -l -v
NAME STATE VERSION
* docker-desktop-data Running 2
docker-desktop Running 2
Ubuntu-20.04 Running 2
And notably, inside WSL I do not see /run/desktop/mnt/...
directory:
$ ls -la /run
total 8
drwxr-xr-x 7 root root 200 Feb 17 22:15 .
drwxr-xr-x 19 root root 4096 Feb 16 17:42 ..
drwxr-xr-x 2 root root 120 Feb 17 22:15 WSL
srw-rw---- 1 root docker 0 Feb 17 22:15 docker-cli.sock
-rw-r--r-- 1 root root 4 Feb 17 22:15 docker-desktop-proxy.pid
srw-rw---- 1 root docker 0 Feb 17 22:15 docker.sock
drwxrwxrwt 2 root root 40 Feb 16 17:42 lock
drwxr-xr-x 2 root root 40 Feb 16 17:42 mount
drwxrwxrwt 2 root root 40 Feb 16 17:42 shm
drwxr-xr-x 2 root root 40 Feb 16 17:42 user
Maybe it will help to pinpoint issue
+6 problem still present on latest docker desktop version (4.17.0). Only happens to me when restarting wsl (wsl.exe --shutdown) and then starting containers using existing bind volumes
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 30 days.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
/remove-lifecycle stale
I am still facing this issue on Version 4.22.0
Hi there - has anyone found a reliable way to re-use named volume bind mounts after a wsl shutdown? My solution so far has been to rename my volumes or project in the docker-compose.yml. The other way is to basically purge all docer desktop data but that is really undesirable. I have had mixed success with shutting down, disabling WLS2 distro integration, restarting pc, enabling wsl integration, restarting but nothing conclusive.
I had been seeing something very similar in a volume mount (but still had a "bind mount" error message), flags: 0x5001 that was mysteriously 'resolved' by removing the :ro flag
+7 Still happening as of 26/01/2024.
The following error happens when I reboot WSL/Windows:
Error response from daemon: error while mounting volume '/var/lib/docker/volumes/app/_data': failed to mount local volume: mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/65a970e7b427d3f6de9844447cb7e0ecf4c6b58160be9705401f0b2e4e479bd7:/var/lib/docker/volumes/app/_data, flags: 0x1000: no such file or directory
Workaround I'm currently using is removing Docker Desktop and installing Docker straight into WSL.
Still seeing this exact issue in v4.28.0 on Windows 11. I start a container with a mounted file, then update the file, restart the container, and get the same error as above. "Workaround" is to restart the docker engine, after which it works again. (Until I update the file of course....)
Information
Steps to reproduce the behavior
I have such docker-compose.yml
And first time it execute fine but if i restart Windows and try run this container again i getting error:
Error invoking remote method 'docker-start-container': Error: (HTTP code 500) server error - error while mounting volume '/var/lib/docker/volumes/traefik-certs/_data': failed to mount local volume: mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/1a8c01243b0f51b6ce3beec294968223f7e139c951cc48880b4f36f9a5e28e01:/var/lib/docker/volumes/traefik-certs/_data, flags: 0x1000: no such file or directory
Why it fails? And why it works the first time?