Im 远距学校服务器(Ubuntu 20.04.2 LTS)的视力成像成像法(VScode,第1.66版),以履行某些任务,今天,我跟踪了狗.com(),在乌班图安装码头发动机。
当我做<条码>sudo docker 运行 hello-world,以核实多克发动机是通过运行<条码>hello-world而正确安装的。 在所有步骤之后,图像都显示出错误:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See docker run --help .
在我对<代码>docker版本进行核对后,该编码显示:
Client: Docker Engine - Community
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:48:02 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
然后看sudo docker info
,其中显示:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.8.1-docker)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
在我不停地盘问和回头 do击这个理论之后,它仍然显示出这种错误,我认为,我需要追随cker器的服务器,但我不知道如何这样做?
这是历史:
root@yp:~# sudo apt-get remove docker docker-engine docker.io containerd runc
...
root@yp:~# sudo apt-get update
...
root@yp:~# sudo apt-get install
> ca-certificates
> curl
> gnupg
> lsb-release
...
root@yp:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
...
root@yp:~# echo
> "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu
> $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
...
root@yp:~# sudo apt-get update
...
root@yp:~# sudo apt-get install docker-ce docker-ce-cli containerd.io
...
root@yp:~# sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See docker run --help .