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

Several ways to hide Html elements

1. Use CSS Copy code The code is as follows: style...

Detailed tutorial on using Docker to build Gitlab based on CentOS8 system

Table of contents 1. Install Docker 2. Install Gi...

Implementation of Nginx configuration of local image server

Table of contents 1. Introduction to Nginx 2. Ima...

MySQL Router implements MySQL read-write separation

Table of contents 1. Introduction 2. Configure My...

Analyze Tomcat architecture principles to architecture design

Table of contents 1. Learning Objectives 1.1. Mas...

JavaScript custom calendar effect

This article shares the specific code of JavaScri...

JavaScript regular verification password strength implementation method

exhibit design Password strength analysis The pas...

How to download excel stream files and set download file name in vue

Table of contents Overview 1. Download via URL 2....

Solution to MySQL Chinese garbled characters problem

1. The Chinese garbled characters appear in MySQL...

Let's talk about the issue of passing parameters to React onClick

Background In a list like the one below, clicking...

A brief description of the relationship between k8s and Docker

Recently, the project uses kubernetes (hereinafte...

Several situations where div is covered by iframe and their solutions

Similar structures: Copy code The code is as foll...

Description of the default transaction isolation level of mysql and oracle

1. Transaction characteristics (ACID) (1) Atomici...

Vue directives v-html and v-text

Table of contents 1. v-text text rendering instru...