I'm getting the same thing running on Ubuntu Desktop 20.04
"Docker is not running" when installing Laravel from Linux
I thought I'd follow the docs to get Laravel up and running with Sail.
At the point in the docs where it says:
curl -s https://laravel.build/example-app | bash
I received the message in the terminal "Docker is not running"
This is my first outing with Docker. Docker Engine is installed and tested as per the instructions on the docker webpages. I'm on Ubuntu.
Same in here
i have same issue with Debian 10
I had this problem when I first tried it on my Mac. The solution was simply to find the docker app in my apps folder (where all Mac apps are installed) and double click it. Then the curl command in the original post above did the rest.
Hi issues happen because you need start docker "rootless" , ie without sudo by default
i have 'invalid reference error" from docker On Mac, Docker desktop installed
For those who are using Ubuntu or Debian can check this guide out on how to install and configure Docker.
https://www.howtoforge.com/tutorial/docker-installation-and-basic-usage-on-ubuntu-1804-lts/
When it comes to Mac, make sure you are running Docker Desktop and that you have the little ship icon in the top right corner.
You may not be running docker on ubuntu rootless so you'll need to use Sudo.
ex.
sudo vendor/bin/sail up -d
this fixed it for me.
Dont run docker as sudo.. Follow the guide posted by @sylvain92
I did this as well. Thank you.
Thanks to all those that replied. Yes, this was a permissions issue with docker.
You can trace the error message to the /bin/sail file. There, the line says:
# Ensure that Docker is running...
if ! docker info > /dev/null 2>&1; then
echo -e "${WHITE}Docker is not running.${NC}"
exit 1
fi
but i knew docker was there and working. So, I tried docker info from my terminal and discovered it was a permissions issue.
I read the docs and found the same solution as posted by @sylvain92 above, at https://docs.docker.com/engine/install/linux-postinstall/ , and it solved the problem.
However, I was unable to get those permissions to "stick" beyond the current terminal session. If I close the terminal, I have to follow the instructions again. More investigation needed.
As an aside, I was following the Laravel docs on Sail on a new Laravel project. This was on an Ubuntu machine which was a fresh installation. For anyone else in this situation, I can confirm that there are MANY hurdles to jump over to even get to point of being able to start an installation. When docker was causing me issues, I had to revert to composer, but that brought it's own problems - installing composer, upgrading PHP, etc.
When I did get going with docker I was met with further problems to do with mysql and apache running and taking up ports.
I came into this Sail project with the expectation that this was going to be a simple thing to get up and running - that is how it is pitched - and it is far from simple. I'm reasonably competent with this stuff and it was a headache for me. I really feel for those who don't have the experience who hope to hit the ground running with Sail. I'm sorry to say that it is not that simple. (Maybe on MAC and Windows it is a lot easier...?)
(After I ran into the first few problems, I began to make notes, with the aim of putting together a quickstart guide for others to follow who might find themselves in my shoes - save the next person from a lot of googling. However, my notes became such a tangled mess in the end that I doubt I could cobble together anything worthwhile.)
If you're on Windows 10, enable your distro integration with Docker on Docker settings > Resources > WSL Integration. After that, restart Docker and you'll be able to run the install command.
If you are on in windows download ubuntu from Microsoft store (which ever you like ) version and in your command prompt write: wsl --list --verbose. Check if ubuntu version is 1 or 2. If its set to 1 change it to 2. You can do it easily by typing: wsl --set-version nameofdistro 2 finally you can open ubuntu command prompt and run it again I hope that helps.
Verify if your distro is the default running by checking if it has asterisk (*) on its name.
wsl --list --verbose
If not, then set it as default:
wsl --set-default <Distro Name>
Example: wsl --set-default Ubuntu
@jurerick This works for me!
This works in Ubuntu: add sudo befor bash '| sudo bash'
Actually its all written on the official docs, have to follow the post-installation part:
https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Then test its working with: (should work without sudo prefix)
docker run hello-world
curl -s https://laravel.build/example-app | bash
I just needed reboot linux
Hi, I think it`s more safest to add sudo to bash command than creating docker group with root privileges, and more simplest than rootless
Ok, I had the same error, everything was installed and running, but what I forget is | bash at the end of the command, so I wrote
curl -s "https://laravel.build/my-app?with=mysql,redis"
instead of
curl -s "https://laravel.build/my-app?with=mysql,redis" | bash
So, be careful, don't be me :)
I had a similar issue (Mint Linux) that was driving me nuts (a short trip, to be fair).
curl -s h t t p s ://laravel.build/example-app | bash
replied with "Docker is not running" (it was/is).
I could run the curl command with sudo, but then other permissions issues would quickly arise...
Endless issues with permissons/user not working correctly. None of the myriad of suggestions on the Great Google helped.
I finally got it to work, by "Reset to factory defaults" in Docker Desktop, under Settings -> troubleshoot. Go figure.
Hope this helps someone else out there, who like me, isn't an utter guru in everything "geek".
Please or to participate in this conversation.