-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure to start container with file mounts after windows reboot or wsl restart #4286
Comments
I ended up finding something funny.
something changes the mounts paths and modifies the volume list and breaks everything. And mount folders from wsl docker command also breaks folder mounts, not just files. |
Is there any news about this ? any idea about when this will be checked on the roadmap ? |
Also Rancher desktop doesn't remount volumes on container restart:
Tested on 1.9.1 / 1.10 with WSL2. |
Perhaps we should regroup all these bugs together, there are so many duplicates of this now. |
Same issue here when trying to open an existing repo with a devcontainer in Rancher Desktop instead of Docker Desktop. |
This just started randomly, not opened the container in a month. Not sure what I have changed (if anything). |
Actual Behavior
After a windows or wsl restart:
Steps to Reproduce
Create a docker-compose file with a file mount.
Run docker-compose up.
Make sure your container is working.
Restart the computer or wsl.
Result
Docker ps -a shows the container with exit code 127
Docker start my-container shows the following error message:
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/mnt/wsl/rancher-desktop/run/docker-mounts/1fa63162-7959-421b-a455-17900d2abae2" to rootfs at "/usr/share/opensearch/config/opensearch.yml": mount /mnt/wsl/rancher-desktop/run/docker-mounts/1fa63162-7959-421b-a455-17900d2abae2:/usr/share/opensearch/config/opensearch.yml (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Error: failed to start containers: opensearch-0
Expected Behavior
Docker ps -a shows a running container
Additional Information
In the error message, /mnt/wsl/rancher-desktop/run/docker-mounts/1fa63162-7959-421b-a455-17900d2abae2 exists as a folder and is not the mounted source file in docker-compose.yml but /usr/share/opensearch/config/opensearch.yml is the correct destination file in the container.
The error doesn't seem to occur when folders are mounted instead of file but that is not always a possible choice.
Rancher Desktop Version
1.8.1 (this bug existed in previous versions)
Rancher Desktop K8s Version
Disabled
Which container engine are you using?
moby (docker cli)
What operating system are you using?
Windows
Operating System / Build Version
Windows 10 21H2 19044.2728
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
N/A
The text was updated successfully, but these errors were encountered: