https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Albert Wibowo

06/05/2023, 10:05 AM
Hello, this may not be related to flyte but I will ask the question anyway. I tried to start a demo using
flytectl demo start
But I encountered the following error:
Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
My docker engine is running tho and I can build images if I want to. Anyone has experienced this before?
s

Sidharth(Sid)

06/05/2023, 10:24 AM
Is your terminal a WSL in windows?
If so, you can check the Docker Desktop app, to see docker engine is integrated with which WSL distro. WSL version 1 does not work with windows Docker engine. WSL2 is required.
a

Albert Wibowo

06/05/2023, 10:31 AM
Nope I have m1 macOs
b

Bernhard Stadlbauer

06/05/2023, 10:40 AM
Could you try
docker run hello-world
?
a

Albert Wibowo

06/05/2023, 10:43 AM
yup just did. it worked.
Hello from Docker!
This message shows that your installation appears to be working correctly.
b

Broder Peters

06/05/2023, 10:45 AM
Do you usually execute the docker command using
sudo
by any chance?
a

Albert Wibowo

06/05/2023, 10:48 AM
Nope. I dont normally use
sudo
when when executing the docker command.
b

Bernhard Stadlbauer

06/05/2023, 11:13 AM
What if you run
DOCKER_HOST="unix:///var/run/docker.sock" docker run hello-world
?
v

Victor Churikov

06/05/2023, 11:18 AM
If you’re using docker desktop on MacOS, and given that it works when you run it manually, perhaps your docker.sock is located at another path that is not
/var/run/docker.sock
. Assuming docker desktop, what version are you using? I’m using docker desktop 4.12 on MacOS, which symlinks by default the
/var/run/docker.sock
path to your actual docker.sock, for example mine looks like this:
Copy code
cictor@Victors-MacBook-Pro % ls -la /var/run/docker.sock
lrwxr-xr-x  1 root  daemon  37 May 29 12:51 /var/run/docker.sock -> /Users/cictor/.docker/run/docker.sock
Version 4.13.0 of docker desktop does not create this symlink anymore: https://docs.docker.com/desktop/release-notes/
• By default Docker will not create the /var/run/docker.sock symlink on the host and use the docker-desktop CLI context instead.
Version 4.13.1 added it back:
• Added back the
/var/run/docker.sock
symlink on Mac by default, to increase compatibility with tooling like
tilt
and
docker-py
. Fixes docker/for-mac#6529.
So if you’re using exactly version 4.13.0, that would be a problem. Please check
a

Albert Wibowo

06/05/2023, 12:42 PM
Yup and that was exactly the problem. The docker.sock is located in another path. I did symlink manually and it worked now. Thank you so much everyone for helping. 🔥
72 Views