Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker daemon already running but still got: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I am trying to use vscode on the containers running on a remote server, but when I use 'Attach visual studio code' function I got this: enter image description here

I have docker daemon running: enter image description here

enter image description here I am in the 'docker' group and I am able to run docker without sudo:

enter image description here

I am running out of solutions here could someone help me?

@Romain This is the print out of ps aux | grep -i vscode (I just screenshot the process of my userid): enter image description here System Info: Ubuntu 16.04.6 LTS; vscode version: Version: 1.60.0-insider (Universal) Commit: 699084fdb48460c68086b85b5c08f3d39055e772; vscode Docker extension version: v1.15.0

like image 559
OrionNebular Avatar asked Sep 18 '25 23:09

OrionNebular


1 Answers

I am struggling with this problem too with Docker Desktop for Mac Intel Chipset.

The error is because docker.sock location for Docker Desktop default is /Users/<user>/.docker/run/docker.sock and some third party use /var/run/docker.sock as default.

You can make sure by manually creating symlink using this command:

sudo ln -s -f /Users/<user>/.docker/run/docker.sock /var/run/docker.sock

You can automatically create symlink from Docker Desktop setting. Allow the default Docker socket to be used (requires password)

enter image description here

More information about the docker socket in this link

https://docs.docker.com/desktop/mac/permission-requirements/

like image 76
Kiddo Avatar answered Sep 21 '25 14:09

Kiddo