Got permission denied while trying to connect to the Docker daemon socket

john@john-PC:~$
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.14.2
Git commit: 1b4342cd4c
Built: Fri Jun 19 03:26:58 2020
OS/Arch: linux/amd64
Experimental: false
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version": dial unix /var/run/docker.sock: connect: permission denied

deepin 20.7 安装docker步骤

  1. sudo apt install docker-ce
  2. docker version 报错
  3. sudo gpasswd -a john docker 添加用户到组
  4. newgrp docker 更新组
  5. docker version 正常
posted @ 2023-02-21 15:50  jiftle  阅读(96)  评论(0编辑  收藏  举报