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

rotaercz's avatar

Need help with error when installing Laravel

So I'm going through this installation process on a brand new installation of Windows 11:

https://laravel.com/docs/9.x#getting-started-on-windows

When I run the following in the terminal:

curl -s https://laravel.build/example-app | bash

I get an error that says:

docker: Error response from daemon: the working directory 'C:/Program Files/Git/opt' is invalid, it needs to be an absolute path.

I can't seem to figure out what's wrong. Docker is setup correctly, WSL2 is installed and enabled, Docker Desktop is configured to use the WSL2 backend.

Does anyone have any experience with this error?

0 likes
1 reply
rotaercz's avatar
rotaercz
OP
Best Answer
Level 3

So I solved my issue. The problem was that I wasn't in the terminal session which was easily fixed by typing 'wsl' and getting into the Linux environment.

After that I had problems with getting 'sail up' working. This thread on github helped me solve this issue.

https://github.com/laravel/sail/issues/190

Even though 'vendor/bin/sail up' can initially fail subsequent runs start up without issue.

The issue can be consistently reproduced by running:

vendor/bin/sail up --build

Please or to participate in this conversation.