20

I just start learning laravel, and follow the tutorial from https://laravel.com/docs/8.x/installation "Getting started on Windows" . I manage to install Docker Desktop and COnfigured to use WSL2 Backend.

When I run the command curl -s https://laravel.build/example-app | bash to create laravel application directory from cmd, this warning come out Docker is not running.

I run curl using command prompt. (cmd).

Update:

So, I run the command in Windows Terminal:.

PS E:\Play> curl -s https://laravel.build/example-app | bash

Here is the response I get:

cmdlet Invoke-WebRequest at command pipeline position 1
Supply values for the following parameters:
Uri:

Any Idea what to do?

3
  • can you elaborate how are you executing curl? using docker exec? did you check if Docker service was active? Commented Feb 11, 2021 at 0:58
  • Docker is running. When I type 'docker --version' , reply 'Docker version 20.10.2, build 2291f61'. Maybe its something in here > laravel.build/example-app ? Commented Feb 11, 2021 at 6:46
  • Seems to me that the script is bash for Unix, did you try to execute the script without using curl? I mean download the script locally and try to execute it locally Commented Feb 11, 2021 at 10:26

6 Answers 6

33

Try to explicitly enable integration with your distro in Docker settings: enter image description here

After that relaunch your WSL2 terminal & try again. That should help. You can also open https://laravel.build/example-app in a browser & check what commands the script is running: and run them manually to check the output for any errors.

Sign up to request clarification or add additional context in comments.

2 Comments

I also had to reboot my computer after doing this. Restarting Docker wasn't enough.
Somehow when docker was in the list of startup apps in windows 10, ubuntu was auto recognizing that it was started but then i disabled it from startup apps, it was showing that Docker is not running. After I checked ubuntu switch which is in above image and restarted docker and ubuntu app both, it worked afterwards.
10

For those who are using Ubuntu or Debian can check this guide out on how to install and configure Docker.

sudo snap install docker 
sudo usermod -aG docker $(whoami) 


sudo chmod 666 /var/run/docker.sock

1 Comment

chmod did the trick for me on a plain Ubuntu installation.
3

You need to install a linux distro, and then in Windows Terminal create a new tab for the linux distro and run the command there, not in a windows powershell tab.

Comments

1

Make sure that you are running curl command on your distro. Use Windows Terminal app and open a new tab as WSL2 (your distro).

Comments

1
sudo chmod 666 /var/run/docker.sock

I guess you are using ubuntu or debian. chmod will do the trick here.

Comments

0

For my Ubuntu 22.04LTS I needed to restart the machine after installing Docker-Desktop, then I set the permissions to 666, as described here.

sudo chmod 666 /var/run/docker.sock

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.