You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing Docker CLI on WSL2, containers that mount volumes with nested mounts fail to unmount them after running, resulting in a "device or resource busy" error. This happens specifically with directories that have nested mounts inside them (like /lib/modules on WSL2).
Steps to Reproduce
Run Docker client on with WSL2
Execute a simple Docker command that mounts a volume with nested mounts, such as:
docker run --rm --volume /lib/modules:/lib/modules alpine ls /lib/modules
docker: Error response from daemon: failed to modify the response from the backend: munger failed for /containers/706d9ae2589c9d182688bffb9231de545ab82dc51185ff25813ce18c2a89b8d3/start: could not unmount bind mount /mnt/wsl/rancher-desktop/run/docker-mounts/6efe3666-a5cc-42b2-8ddd-5dc326a49ff3: device or resource busy.
The unmount operation fails because the nested mounts within the volume cannot be properly unmounted.
Expected Behavior
Docker should correctly unmount all volumes after container execution, regardless of whether they contain nested mounts. The command should complete successfully without any errors about unmounting or busy devices.
Additional Information
This issue occurs specifically with nested mounts. A nested mount is when a directory already has other filesystems mounted within it, and then that parent directory is bind-mounted into a container.
I've attached a test script (repro-nested-mounts.sh) that reliably reproduces this issue by:
Creating tmpfs mounts at /tmp/<GUID>/outer and /tmp/<GUID>/outer/inner
Binding the outer mount to a Docker container
Running a docker container that mounts /tmp/<GUID>/outer
Attempting to clean up all mounts when done
Rancher Desktop Version
1.17.0
Rancher Desktop K8s Version
N/A
Which container engine are you using?
moby (docker cli)
What operating system are you using?
Windows
Operating System / Build Version
Windows 11
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
No response
The text was updated successfully, but these errors were encountered:
Actual Behavior
When executing Docker CLI on WSL2, containers that mount volumes with nested mounts fail to unmount them after running, resulting in a "device or resource busy" error. This happens specifically with directories that have nested mounts inside them (like /lib/modules on WSL2).
Steps to Reproduce
repro-nested-mounts.txt
Alternatively, use the attached script
repro-nested-mounts.sh
which creates a reproducible test caseTo use the attached script:
Result
Error message similar to:
The unmount operation fails because the nested mounts within the volume cannot be properly unmounted.
Expected Behavior
Docker should correctly unmount all volumes after container execution, regardless of whether they contain nested mounts. The command should complete successfully without any errors about unmounting or busy devices.
Additional Information
This issue occurs specifically with nested mounts. A nested mount is when a directory already has other filesystems mounted within it, and then that parent directory is bind-mounted into a container.
I've attached a test script (
repro-nested-mounts.sh
) that reliably reproduces this issue by:Rancher Desktop Version
1.17.0
Rancher Desktop K8s Version
N/A
Which container engine are you using?
moby (docker cli)
What operating system are you using?
Windows
Operating System / Build Version
Windows 11
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
No response
The text was updated successfully, but these errors were encountered: