Solve the permission problem of docker.socket of vscode docker plug-in



Solution: kill all. Vscode related processes in the system (remote server if remote SSH is used)
These processes are.vscodeFolder, so you can search directly.vscodeKill them and restart vscode to solve the problem.


Knowledge point extension:

Docker plug-in in vscode cannot connect

Failed to connect. Is docker running

Error: connect EACCES /var/run/docker.sock

Cause analysis

The reason is that docker uses UNIX socket for communication, but UNIX socket belongs to root user, but ordinary users need to use sudo to enable root permission, but ordinary operations do not have root permission.


Log in as root, but the security is not guaranteed

Add ordinary users to docker group

Sudo groupadd docker # add docker user group
Sudo gpasswd - a $user docker # adds the current user to the docker user group
Newgrp docker # update docker user group

Log in to vscode again after adding. After the user reconnects, the docker plug-in will run normally.


You can run the docker PS command. If there is normal output, it is normal.

The above is the details of the permission of the docker.socket of the vscode docker plug-in. For more information about the permission of the docker socket, please pay attention to other related articles of developeppaer!