skip to Main Content

I installed docker and downloaded an ubuntu distro to run with laravel sail,planing to use swoole php,and made it default,also made wsl version to 2
enter image description here

with docker-compose.yml ready from laravel sail docker-compose.yml:
enter image description here

but every time I try to run the sail up cmd,it gives me this error " Unsupported operating system [MINGW64_NT-10.0]. Laravel Sail supports macOS, Linux, and Windows (WSL2)."

enter image description here

any ideas how to fix this ?

2

Answers


  1. You need to run the sail up command from inside your WSL2 Ubuntu Image not directly from your terminal. Once you do that it should work ok

    Login or Signup to reply.
  2. If you are using windows follow these steps.

    1. Make sure ubuntu and WSL 2 is installed, you can follow the instructions here
    2. After successful installation of ubuntu, your file system now shares the same file system with your ubuntu, this means if you want to run ubuntu commands on a folder path you have to open the corresponding terminal. If you are using Visual Studio Code, you can select the corresponding ubuntu terminal for the file directory by selecting ubuntu as the new terminal, it will open the Ubuntu terminal on the current path.
    3. You can run ./vendor/bin/sail up. Make Sure you are running the command from your project folder in Ubuntu. Usually the folder is always in /mnt/c/users/path/to/project.
    4. If you see docker not running. Open your docker desktop, go to setting, under resources, select WSL and enable integration with your ubuntu
      Integrating WSL ubuntu with docker
    5. Restart your terminal, and run the command again. Don’t forget under you Ubuntu file system which is usually in /mnt/c/users/path-to-laravel-project.
      you should see the following for the first time. Note the folder path highlighted.Laravel Sail running for the first time
    6. One last thing, in order to access your laravel app on your localhost, you have to access the WSL IP address that connects to Ubuntu. use the following command. wsl hostname -i it outputs an IP address like enter image description here, Note! your IP address may be different. Navigate to the IP address on default port 80 and you should see.Laravel Sail running Succesfully

    I wish you a successful project. Enjoy!!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search