Thursday, April 07, 2022

Install Laravel Sail on Windows


 

10 Steps to install Laravel Sail and start developing web applications under WSL:

1. from Turn Windows features on and off:

choose Windows subsystem for Linux (WSL) -> and restart the system

2. update the kernel of WSL from https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

3. set the default version to 2: wsl --set-default-version 2

4. install from Microsoft Store: Ubuntu

open Command prompt, and type ubuntu

5. Update the ubuntu system:

sudo apt-update && sudo apt dist-upgrade -y

6. Setup Docker: Install Docker Desktop

Go to Settings(icon) then check: General->Use the WSL2 based engine, as well as

Resources->WSL INTEGRATION-> enable integration with my default WSL distro, check also Ubuntu and restart the Docker Desktop app.

7. run inside Ubuntu: curl -a https://laravel.build/example-app | bash

8. start the containers with: ./vendor/bin/sail up

9. you can browse: 127.0.0.1:80

10. in another terminal of Ubunu run: code .

so that you can edit your files inside Visual Studio Code.

Cheers!

No comments:

Subscribe To My Channel for updates