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

[Docker Desktop for Mac] ERROR ==> connect ENOENT /var/run/docker.sock #3533

Open
Bahlaouane-Hamza opened this issue Mar 8, 2023 · 20 comments
Labels
bug Something aint working right!

Comments

@Bahlaouane-Hamza
Copy link

Bahlaouane-Hamza commented Mar 8, 2023

Summary

This issue is for reference and documentation purposes only. not sure if it's a bug

After installing lando with Docker Desktop for Mac and running

$ lando init \
  --source cwd \
  --recipe lamp \
  --webroot . \
  --name hello-lando

I get the following error

WARN ==> docker is not running!
Starting docker up before we begin... please wait.
ERROR ==> connect ENOENT /var/run/docker.sock

System

  • Ventura 13.2.1 (22D68)
  • Lando v3.11.0
  • Docker Desktop 4.17.0 (99724) is currently not supported by Lando

My attempts to fix the error...

  1. Find location docker.sock
$ docker --config
Options:
      --config string      Location of client config files (default "/Users/user/.docker")

Socket path is /Users/user/.docker/run/docker.sock ($HOME/.docker/run/docker.sock)

  1. Find lando config file using to following command and look for configSources
$ lando config

Open one of the config files (i chose the last one /Users/user/.lando/config.yml) and add the following

engineConfig:
  host: 127.0.0.1
  port: 2376
  socketPath: /Users/user/.docker/run/docker.sock

For host and port, make sure to verify they are the same as shown in

$ lando config | grep docker

> { host: '127.0.0.1', port: 2376, socketPath: '/Users/user/.docker/run/docker.sock' },
  1. Restart or rebuild lando if not successful (I did not have to use this)
@Bahlaouane-Hamza Bahlaouane-Hamza added the bug Something aint working right! label Mar 8, 2023
@Dartui
Copy link

Dartui commented Mar 8, 2023

Same error is popping out for me. However everything worked just fine BEFORE update to 13.2.1 version of MacOS. I see that @Bahlaouane-Hamza has the same version of OS, so that might be a clue.

I've tried updating Lando to the latest version (v3.14.0) but that does not fix the error.

@CodeWilliamson
Copy link

I'm having the same issue on my OS (v13.2.1)

@michaelrobbe
Copy link

As far as I can tell, the OSX upgrade scrubbed the /var/run/ directory, so /var/run/docker.sock was missing.
The hotfix is to just remap the sock file:

sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

@CodeWilliamson
Copy link

I can verify after pointing to the correct location for docker.sock, everything appears fine

@danielmatthew
Copy link

A note: I had to perform this again after a system restart.

@p-drolima
Copy link

p-drolima commented Apr 26, 2023

sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

this fixed it for me

@Zakini
Copy link

Zakini commented May 16, 2023

I just needed to toggle the "Enable default Docker socket" checkbox in the settings to get this back
Screenshot 2023-05-16 at 17 52 10

I'm on version 4.18
Screenshot 2023-05-16 at 17 53 40

@jonpontet
Copy link

@Zakini looks to be the preferred solution 👍

@allahnoorturab
Copy link

allahnoorturab commented Jul 5, 2023

@Zakini's answer worked for me. 😊
v4.21.1

@ameshkin
Copy link

ameshkin commented Aug 3, 2023

sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

This fixed the issue for me, and I am already using 13.5

@nickmaine
Copy link

I had this issue today after a reboot that installed a Mac update. I already had the @Zakini solution enabled months ago. My solution was to toggle "Allow privileged port mapping (requires password)", it was enabled but toggling on/off fixed ERROR ==> connect ENOENT /var/run/docker.sock. 👍

@ThulaneWork
Copy link

sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

this worked for me !!

@rbabyuk-vs
Copy link

fyi
rancher desktop: sudo ln -s ~/.rd/docker.sock /var/run/docker.sock

@mattneal-stafflink
Copy link

I had this issue today after a reboot that installed a Mac update. I already had the @Zakini solution enabled months ago. My solution was to toggle "Allow privileged port mapping (requires password)", it was enabled but toggling on/off fixed ERROR ==> connect ENOENT /var/run/docker.sock. 👍

Can confirm that this fixed my issue after upgrading to Mac Sonoma.

@doruk581
Copy link

Still experiencing this issue. I did all the available solutions on the internet. None of them worked. Docker version 4.24.2. Apple Mac M1 Pro. Macos Sonoma

@ThulaneWork
Copy link

Still experiencing this issue. I did all the available solutions on the internet. None of them worked. Docker version 4.24.2. Apple Mac M1 Pro. Macos Sonoma

I would suggest you download the old version of the docker desktop, the latest version does not work well with Lando. here is a version that worked for me 4.20.0

@shaniiwild
Copy link

As far as I can tell, the OSX upgrade scrubbed the /var/run/ directory, so /var/run/docker.sock was missing. The hotfix is to just remap the sock file:

sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

Thank you !!!!!!

@attheshow
Copy link

This still appears to be happening after every restart for me.

@decodist
Copy link

decodist commented Dec 4, 2023

Same here... @michaelrobbe solution works, but needs to be run after each restart.

@aragrow
Copy link

aragrow commented Dec 13, 2023

Thanks to @Zakini because I had the same issue running dockers 4.23.0. I upgraded to 4.26.0 and the issue remained. FYI, this happened after I upgraded mac to the latest version. THIS WORKED

I just needed to toggle the "Enable default Docker socket" checkbox in the settings to get this back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right!
Projects
None yet
Development

No branches or pull requests