简体   繁体   English

docker:无法连接到unix:///var/run/docker.sock上的Docker守护程序。 docker守护程序是否正在运行?

[英]docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I installed Docker CE from the official docker site on Ubuntu server 16.04.4 LTS, Release: 16.04, Codename: xenial. 我从Ubuntu服务器16.04.4 LTS上的官方docker站点安装了Docker CE,版本:16.04,Codename:xenial。 I can not find the /var/lib/docker file even after I install docker on my machine. 即使在我的机器上安装docker之后,我也找不到/var/lib/docker文件。 When I try to run an Ubuntu container for example with: 当我尝试运行Ubuntu容器时,例如:

docker run -it ubuntu 

an error message: 错误消息:

docker: Can not connect to the Docker daemon at unix: ///var/run/docker.sock

Is the docker daemon running? docker守护程序是否正在运行?

First you have to ckeck if the docker service is running service docker status 首先,如果docker服务正在运行service docker status你必须ckeck

if it's not running, start it: service docker start 如果它没有运行,启动它: service docker start

then you can use docker run .... 然后你可以使用docker run ....

请尝试使用sudo: sudo docker run -it ubuntu

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker-compose | 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? - docker-compose | Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker:无法连接到位于 unix:///var/run/docker.sock 的 Docker 守护进程。 docker 守护程序是否正在运行? - docker:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker中的jenkins-无法通过unix:///var/run/docker.sock连接到Docker守护程序。 泊坞窗守护程序正在运行吗? - jenkins in docker - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker compose in bitbucket - 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? - docker compose in bitbucket - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? macOS - docker:无法连接到 unix:///var/run/docker.sock 的 Docker 守护程序。 docker 守护程序是否正在运行? - macOS - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? "<i>ERROR :Cannot connect to the Docker daemon at unix:\/\/\/var\/run\/docker.sock.<\/i>错误:无法连接到 unix:\/\/\/var\/run\/docker.sock 上的 Docker 守护程序。<\/b> <i>Is the docker daemon running<\/i> docker 守护进程是否正在运行<\/b>" - ERROR :Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running CentOS 7 - 无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - CentOS 7 - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 如何修复错误“无法连接到 unix:///var/run/docker.sock 的 Docker 守护程序。 docker 守护程序是否正在运行” - How to fix the error “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running” Gitlab Runner 无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - Gitlab Runner Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 大厅:无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - Concourse: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM