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:~$ sudoaptinstall docker.io -yt@t:~$ docker info
Client:Version: 24.0.5Context: defaultDebug Mode: falseServer:
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 dockert@t:~$ exit# 重新登陆ssh t@192.168.15.128t@t:~$ docker info
Client:Version: 24.0.5Context: defaultDebug Mode: falseServer:Containers: 0Running: 0Paused: 0Stopped: 0Images: 0Server Version: 24.0.5
...