I'm running production containers with Docker Desktop using the WSL2 backend on Windows Server 2022. The host is shut down every night and started again when needed. After a reboot, the Odoo container sometimes fails to start with an error saying that a path such as /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/ does not exist.
My Compose file uses relative mounts for Odoo:
- odoo-data:/var/lib/odoo
- ./extra-addons:/mnt/extra-addons
- ./config:/etc/odoo
The named volume is expected, but Docker is also showing the two relative paths as bind mounts whose sources are temporary Docker Desktop paths under /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/. Those paths disappear after a restart.
A separate Nginx service in the same Compose project uses ./nginx/conf.d and ./nginx/certs, yet its inspected mounts resolve directly to /home/mickael/odoo-gema/... and continue working. Why are the Odoo mounts being translated into temporary paths while the Nginx mounts are not, and what is the correct way to prevent the containers from breaking after reboot?
4 Answers
Those /run/desktop/... paths are Docker Desktop’s bind-mount proxy. Docker Desktop creates them when a host path has to be made visible inside its Linux VM. They are implementation details, not paths from your Compose file, and they can disappear when Docker Desktop or WSL is restarted.
The first thing to check is the fully resolved configuration with `docker compose config`. Confirm the project directory and the resolved `source` values, rather than relying on the relative paths shown in the YAML. Also make sure the Compose command is being run from the same WSL directory every time and that the directories exist before the containers are created. If the containers were created with an older configuration, remove and recreate them after correcting the paths.
Nginx working does not prove that both services were created from identical resolved input. Inspect the running container’s labels, creation time, and the output of `docker compose config`; compare those with `docker inspect`. A container can retain mount settings from an earlier Compose run even after the YAML has been changed. Recreating it rather than merely restarting it is important when diagnosing this kind of problem.
There may also be a startup race. Docker Desktop, its WSL distributions, the integration with Ubuntu, and the Compose project do not necessarily become ready at exactly the same time after Windows boots. Starting containers before Docker Desktop has fully initialized can leave stale or incomplete mount-proxy state.
For a production deployment, avoid depending on Docker Desktop’s on-demand startup if possible. Run Docker Engine natively inside WSL/Linux, or use a supported native Windows container setup when Windows containers are actually required. At minimum, ensure Docker Desktop and WSL are fully started before bringing the Compose project up, and recreate containers if they retain obsolete mount definitions.
The most reliable setup is to keep the project and all bind-mounted files inside the WSL filesystem, for example under /home/mickael/odoo-gema, and run Compose from there. Avoid launching the project through a Windows path, a mounted /mnt/c path, or a Windows-side Docker client if possible. Use absolute Linux paths temporarily to verify what Docker is receiving, then recreate the containers with `docker compose down` followed by `docker compose up -d`.
The named `odoo-data` entry is a Docker-managed volume, not a bind mount, so it is unrelated to the temporary bind-mount directories. The Odoo image itself does not normally require Docker to invent permanent host paths for these mounts.

Both services are currently in the same Compose file and are launched from /home/mickael/odoo-gema, which is why the different inspected sources seemed unusual.