kubevela / velad

Lightweight KubeVela that runs as Daemon in single node with high availability.
Apache License 2.0
67 stars 16 forks source link

Fail to install due to docker socket file not in right place. #133

Open NeerajGartia21 opened 1 year ago

NeerajGartia21 commented 1 year ago

Description

while setting up Velacore using velad install, the following error occurred.

Screenshot 2023-03-14 at 8 12 35 PM

The following three containers are running.

Screenshot 2023-03-14 at 8 15 16 PM

System info

MacOS ventura 13.1

chivalryq commented 1 year ago

Hi, what's your docker version? Are you using docker desktop?

NeerajGartia21 commented 1 year ago

Docker version is 20.10.20 and I'm using docker desktop.

chivalryq commented 1 year ago

Can you check whether /var/run/docker.sock is ok?

NeerajGartia21 commented 1 year ago

docker.sock is not there in /var/run

it is in /Users/neerajgartia/.docker/run/docker.sock.

NeerajGartia21 commented 1 year ago

Thanks @chivalryq , The issue got resolved by running sudo ln -s $HOME/.docker/run/docker.sock /var/run/docker.sock Now Velacore is installed perfectly.

NeerajGartia21 commented 1 year ago

vela CLI is not installed and its showing

fail to install vela CLI: Fail to create symlink: symlink /usr/local/bin/velad /usr/local/bin/vela: permission denied
chivalryq commented 1 year ago

You can create a symlink from /usr/local/bin/velad to /usr/local/bin/vela @NeerajGartia21

NeerajGartia21 commented 1 year ago

Thanks @chivalryq , It got successfully installed.

chivalryq commented 1 year ago

Cool! I'm gonna close this issue since it's addressed.

justenwalker commented 1 year ago

@NeerajGartia21 @chivalryq

If you run Docker Desktop, /var/run/docker.sock is no longer created. See: https://github.com/docker/for-mac/issues/6529

A work-around without needing to sudo ln -s is to explicitly set the DOCKER_HOST environment variable before running velad:

export DOCKER_HOST="unix://$HOME/.docker/run/docker.sock"
velad install
chivalryq commented 1 year ago

@justenwalker Great job! I'll reopen the issue before velad can detect the alternate path for docker socket.