I am trying to set up Docker and Laravel 9 (both for the first time) on my Windows 10 system by following the instructions on the official Laravel website.
I have successfully installed Docker Desktop
and have also successfully installed and activated Windows Subsystem for Linux 2 (WSL2).
I then installed Windows Terminal, connect to an Ubuntu 22.04 container that I have started and tried to run the following command as instructed on the official Laravel website:
curl -s https://laravel.build/example-app | bash
But instead of creating a new project example-app
, I get the following message instead:
Docker is not running.
What am I doing wrong?
Ok so I finally figured it out. When I open Windows Terminal, I need to first run wsl
and then go forward with curl-ing Laravel and using it.
So after installing and activating WSL2 in Windows & Docker Desktop, the steps to follow would be:
wsl
.curl -s https://laravel.build/example-app | bash
command.cd
to the the new Laravel application example-app
directory and then use Laravel Sail to run it.