I’m encountering an issue with Docker on WSL2 after restarting my PC. When attempting to start a container, I get the following error:
(HTTP code 400) unexpected - failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-22.04/ed3bf75767921f6cc84d3ea4e8e7380773c14fb79c912fc8153c9b96e6e885a4” to rootfs at “/home/hailo/.Xauthority”: mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-22.04/ed3bf75767921f6cc84d3ea4e8e7380773c14fb79c912fc8153c9b96e6e885a4:/home/hailo/.Xauthority (via /proc/self/fd/7), 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
Observations:
- This issue only occurs after a full system reboot.
- It does not happen on a fresh Docker installation even after docker restarts.
Environment:
- WSL2 running Ubuntu 22.04
- Docker Desktop (latest version as of now)