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

Sinnbeck's avatar
Level 102

Windows 10 with WSL2, docker and laravel (how to)

For you windows users out there. I just managed to get Windows 10 working with WSL2 and docker, running 200ms in response time. Pretty neat!

The trick I used was to install Ubuntu in the store, and windows terminal. I then opened the ubuntu terminal from the windows terminal. From there I installed php7.4 and installed php and laravel. I then started docker from inside there.

Opening the files in VSCode is easy. Just open the path \\wsl$ and browse to your files

I used laravel served to run docker, but takeout or laradock should work as well I would think.

0 likes
3 replies
James_Moore's avatar

takeouts available on windows ?! or is it available through the linux setup with wsl ? Real excited to finally donate some time to setup a docker environment for our team. Were still all running vagrant / homestead.

Sinnbeck's avatar
Level 102

@james_moore I think it should be working on Linux and as it is run from there, I think it would work. Honestly haven't tried it yet. But my own package is quite similar, and that works. https://github.com/sinnbeck/laravel-served

@laracoft Just the response of the laravel dashboard. I had been told that WSL2 and docker was broken, and that you would get responses of 3-8 seconds for a single page load.

I first just tried running docker directly from a folder in windows. It worked but with the promised response time of 3-8 seconds. So I started searching for a solution. I found the above in a github thread (it just said "move everything to wsl, and use wsl command line"), and it worked (avg 5 seconds, to 200ms)

image

1 like

Please or to participate in this conversation.