Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

trogne's avatar

WSL and Docker - strange folder name (Laravel Sail)

I'm using Laravel Sail for Laravel installation on Windows.

For WSL, I use the distribution Ubuntu-20.04.

After I enter Ubuntu, with wsl -d Ubuntu-20.04, I'm on the path "/mnt/d/htdocs/laracasts/".

But Docker Desktop, after started, changes the path drastically : "/mnt/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/5db8e096e96dcde99007566869902027a09524bd8527abe745a095f1f1e272a9"

That means that in my Docker panel, I see "5db8e096e96dcde99007566869902027a09524bd8527abe745a095f1f1e272a9" under "Containers / Apps".

Even if I use the "docker-desktop" default distribution, wsl -d docker-desktop, I still get there : "/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/5db8e096e96dcde99007566869902027a09524bd8527abe745a095f1f1e272a9"

Another try : I uninstalled Docker Desktop and the microsoft store Ubuntu 20.04 app.

Then reinstalled the Ubuntu, but this time, not 20.04, but only Ubuntu (which is 20.04 anyway). And reinstalled Docker Desktop.

Same problem : With docker desktop started. Going to ubuntu, with “wsl -d Ubuntu”, the path is now

“/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/5db8e096e96dcde99007566869902027a09524bd8527abe745a095f1f1e272a9”

Instead of “/mnt/d/htdocs/laracasts/lar8frsc”.

And under “Containers / Apps” in docker panel, I have one listed as “5db8e096e96dcde99007566869902027a09524bd8527abe745a095f1f1e272a9”. Not very friendly name.

Any ideas ?

0 likes
1 reply
trogne's avatar

In the meantime, since there's a strong recommendation to no use mounts across operating systems (i.e. "/mnt/..."), I create my projects directly in the Linux File System (i.e. "\\wsl$\Ubuntu\home\trogne\myprojectname").

You can read the recommendation here : https://docs.docker.com/docker-for-windows/wsl/

And there's also an alert for that in vscode if you launch it ("code .") in a "/mnt" folder: "This workspace is on the Windows file system (/mnt/). For best performance, we recommend moving the workspace to the Linux file system (~/home)."

I also create a symbolic link : mklink /D lar8frsc "\\wsl$\Ubuntu\home\trogne\laracasts\lar8frsc" symbolic link created for lar8frsc <<===>> \\wsl$\Ubuntu\home\trogne\laracasts\lar8frsc

Then I can "code ." from within my windows folder.

Please or to participate in this conversation.