环境
t@t:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
问题
t@t:~$ sudo apt install docker.io -y
t@t:~$ docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false
Server:
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info": dial unix /var/run/docker.sock: connect: permission denied
errors pretty printing info
解决
t@t:~$ sudo gpasswd -a ${USER} docker
Adding user t to group docker
t@t:~$ exit
ssh t@192.168.15.128
t@t:~$ docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 24.0.5
...