English 中文(简体)
cker: Cannotlink to the Docker daemon at unix:///var/run/docker.sock. cker子吗?
原标题:docker:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

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 .
最佳回答

您应首先开始,使cker能够进入系统

systemctl start docker
systemctl enable docker
问题回答

www.un.org/Depts/DGACM/index_spanish.htm 公正解决了与相同的问题。

The first thing you should do is to have Docker Desktop installed on your pc, of which you can get here https://docs.docker.com/desktop/windows/wsl/

You should also enable wsl2, Just going through the documentation from the link above should be enough.

Make sure you go into Settings>Resources>WSL Integration and enable Ubuntu-20.04 or any other distro you are using.

此外,还确保设置和设计;总和; 统一以WSL 2为基础的发动机......检查箱

我尝试了<条码>用户mod,并改变了许可,但我仍然照搬了同样错误的六氯环己烷。 在挖掘目录和档案后,我发现有 do器是连接<编码>docker.sock的。 但是,它有些失败。

ls -l /home/USERNAME/.docker/desktop

Check symlink for docker.sock to /var/run/docker.sock exist or not.

如果金字塔确实存在,那就会产生。

  1. First backup original docker.sock file.
mv /home/USERNAME/.docker/desktop/docker.sock /home/USERNAME/.docker/desktop/docker.sock.bak
  1. Create symlink
sudo ln -sv /var/run/docker.sock /home/USERNAME/.docker/desktop/docker.sock

你们必须将产出视为:

Run docker run hello-world again, it might be working now.

P.S. I am seeing there are other files too in the same directory, they are not symlink. I will be attentive and if I face any error I would try creating symlink again for other files too. I will update my answer too.

对于从搜索中抵达的持久性有机污染物用户,也尝试:

  • running the docker command without sudo (that s how rootless mode works)
  • Add your user account to the docker group sudo usermod -aG docker $USER 1

用户使用<条码>发射<>

sudo launchctl start docker
sudo launchctl enable docker

1. 如果您的履历在册,请作检查。

/var/run/
/var/run/docker.sock

我没有。

docker context ls

DOCKER ENDPOINT

So I created symbolic link. And everything worked fine

sudo ln -s /Users/user/.docker/run/docker.sock /var/run/docker.sock

I just had the same problem that you describe here : "ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

我在当地操作了 do台,配备了WSL2,使我得以找到解决办法:

  • Go into the task manager
  • Kill all active process of Docker desktop by selecting each and click "End the task" (several were trying to start)
  • Start Docker desktop
  • Then an update was automatically downloaded and installed (I don t know if it was it that was ruining the starting of docker)
  • Then Docker start properly

Good luck





相关问题
Add a changing icon to Ubuntu Panel

What would be the most simple way of adding and changing an icon in the Ubuntu (Gnome) Panel? I m looking for something as simple as shell scripting, but I m not restricted to that. Will write a ...

Configuring kernel

After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...

save Exceptions to file in python

I want to save all following Exceptions in a file. The reason why I need this is because the IDLE for python 3.1.1 in Ubuntu raises an Exception at calltipps, but close to fast, that it isn t readble. ...

How can i monitor system statistics in kubuntu using Java?

i am doing a project related to configuration and memory analyzer for kubuntu. i want to display the system statistics information like CPU usage, RAM usage and proceses etc. graphically using an ...

How to pass "--external-locking" for mysqld in Ubuntu

I would like to start my mysql server with the --external-locking option. As mysqld is run by the /etc/init.d/mysql script ubuntu (karmic), I guess that s where I should set this "--external-locking" ...

"g++" and "c++" compiler

I just found on my Ubuntu, there are two different C++ compilers: /usr/bin/g++ and /usr/bin/c++. I am not familiar with the latter, but man c++ just jumps to the manpage of gcc. I wonder what is their ...

热门标签