Solve the docker.socket permission problem of vscode docker plugin

Solve the docker.socket permission problem of vscode docker plugin

insert image description here

Solution: Kill all .vscode related processes in the system (or the remote server if remote-ssh is used)
These processes are all in the .vscode folder, so you can directly search for .vscode to kill them, and then restart vscode to solve the problem.

insert image description here

Knowledge point expansion:

Docker plugin in vscode cannot connect

Error: 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 the unix socket belongs to the root user. However, ordinary users need to use sudo to enable root permissions, but ordinary operations do not have root permissions.

Solution

Log in as root user, but security is not guaranteed

Add ordinary users to the docker group

sudo groupadd docker #Add docker user group sudo gpasswd -a $USER docker #Add the current user to the docker user group newgrp docker #Update the docker user group

After adding, log in to vscode again, and the docker plugin will run normally after the user reconnects.

test

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

The above is the details of the docker.socket permission issue of the vscode docker plugin. For more information about docker socket permissions, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Detailed tutorial on how to publish springboot projects through docker plug-in in IDEA
  • Install Jenkins with Docker and solve the problem of initial plugin installation failure
  • Implementation steps of Maven plugin to build Docker image
  • How to use Maven plugin to build images in Docker
  • Steps to automatically deploy war packages to docker using docker -v and Publish over SSH plugins
  • A brief discussion on how to build Docker images using Maven plugins

<<:  Do you know how to use Vue to take screenshots of web pages?

>>:  BUG of odd width and height in IE6

Recommend

How to use Zen coding in Dreamweaver

After I published my last article “Zen Coding: A Q...

How to read the regional information of IP using Nginx and GeoIP module

Install GeoIP on Linux yum install nginx-module-g...

Linux sar command usage and code example analysis

1. CPU utilization sar -p (view all day) sar -u 1...

In-depth explanation of modes and environment variables in Vue CLI

Preface In the development of actual projects, we...

Pitfalls and solutions for upgrading MySQL 5.7.23 in CentOS 7

Preface Recently, I found a pitfall in upgrading ...

Docker Getting Started Installation Tutorial (Beginner Edition)

Doccer Introduction: Docker is a container-relate...

Detailed explanation of several solutions for JavaScript interruption requests

Table of contents 1 Promise Interrupt the call ch...

Summary of methods for finding and deleting duplicate data in MySQL tables

Sometimes we save a lot of duplicate data in the ...

Detailed process record of Vue2 initiating requests using Axios

Table of contents Preface Axios installation and ...

Management of xinetd-based services installed with RPM packages in Linux

Table of contents Preface 1. Startup management b...