Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Docker on WSL2 + Ubuntu #3604

Open
jerasokcm opened this issue Sep 15, 2023 · 8 comments
Open

Error with Docker on WSL2 + Ubuntu #3604

jerasokcm opened this issue Sep 15, 2023 · 8 comments

Comments

@jerasokcm
Copy link

I’m trying to install a dockerized local environment with Lando + Bedrock + Sage, based on the coltoneakins’s guide I found in the Roots.io forum:

https://discourse.roots.io/u/coltoneakins

I’m using Ubuntu 22.04 inside WSL2 Windows 10 environment (Not using Docker desktop).

The problem arises in step 6, when I run:

lando start

I got this error:

WARN ==> docker is not running!
Starting docker up before we begin… please wait…
ERROR ==> Could not automatically start the Docker Daemon. Please manually start it to continue.

Then I tried to start the daemon manually:

sudo service docker start

I got OK, but the error is not gone

Docker is working fine, since I have some docker-compose projects running.

Also tried to install Lando without docker-ce dependency, but the result is the same.

Any suggestion will be greatly appreciated.

@mikeethedude
Copy link
Sponsor

I've seen similar before but usually in between there is a prompt to enter a password for the sudo user so Lando has permission to start docker itself. Have you seen a prompt or opportunity to do that?

@jerasokcm
Copy link
Author

Thanks for your answer @mikeethedude

There is no prompt for password.
Lando cannot detect Docker daemon running, despite the fact that it is already running.

@inuk66
Copy link

inuk66 commented Sep 29, 2023

@jerasokcm not sure if this will help, but I have Docker Desktop installed on Windows and have enabled WSL integration.

image

I then start Docker Desktop on Windows before running lando within WSL.

@jerasokcm
Copy link
Author

Thanks, @inuk66. I will give it a try.

I'm not using Docker Desktop and I prefer to avoid it, but maybe it is required to make this work.

@uberhacker
Copy link
Contributor

Docker Desktop should not be needed to run Lando in WSL2. Just install the Docker Engine deb packages as described here: https://docs.docker.com/engine/install/ubuntu/. Whoever thought of the idea of Docker Desktop for Linux should be shot. :)

@mikeethedude
Copy link
Sponsor

I did have a lot more trouble running lando when using Docker Desktop in Windows with the WSL2 plugin. Especially with xdebug and things. Agree with the above suggestion. I'd probably reinstall lando as well. FWIW I installed Lando with the old hyperdrive script to get things going originally. I don't think it's officially the way to go still but it helped. https://github.com/lando/hyperdrive/tree/v0.6.1

@rvandoorn
Copy link

The prompt is working for me so I can't help with that.
But I do like to share my experiences with docker desktop and WSL. It is a performance nightmare, I had to restart WSL constantly. Switching to a ubunto package gives you much beter performance.
Also make sure you exclude WSL from things like virus protection and firewall crap that Windows enables by default. Just google how to do that, there a some examples for how to do that with some powershell commands.

@wwhurley
Copy link

Like @rvandoorn, I highly recommend using the docker-ce packages rather than Docker Desktop. One thing I did notice after updating to Lando 3.20.4 is that it doesn't recognize that I have docker compose v2.21.0 and wants to try and download it:

$ docker compose version
Docker Compose version v2.21.0
$ lando rebuild -y
Could not detect docker-compose v2.21.0! Downloading it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants