Docker:Cannot connect to the Docker daemon. Is the docker daemon running on this host?[已解决]

标签: docker
972人阅读 评论(0) 收藏 举报
分类:

解决方法:

查看是否存在进程:

$ ps aux |grep docker

停止进程

$sudo service docker stop

重启docker:

$dockerd

或者:

If you see an error such as the following, your Docker client may be configured to connect to a Docker daemon on a different host, and that host may not be reachable.

Cannot connect to the Docker daemon. Is ‘docker daemon’ running on this host?
To see which host your client is configured to connect to, check the value of the DOCKER_HOST variable in your environment.

$ env | grep DOCKER_HOST
If this command returns a value, the Docker client is set to connect to a Docker daemon running on that host. If it is unset, the Docker client is set to connect to the Docker daemon running on the local host. If it is set in error, use the following command to unset it:

$ unset DOCKER_HOST
You may need to edit your environment in files such as ~/.bashrc or ~/.profile to prevent the DOCKER_HOST variable from being set erroneously.

If DOCKER_HOST is set as intended, verify that the Docker daemon is running on the remote host and that a firewall or network outage is not preventing you from connecting.

查看评论

Docker之道

-
  • 1970年01月01日 08:00

执行docker ps命令,出现 "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. ..."问题

执行docker ps命令,出现 “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docke...
  • zxzxzxzx2121
  • zxzxzxzx2121
  • 2017-03-13 11:16:11
  • 20449

Docker实践6:Cannot connect to the Docker daemon.

正在免费适用着Aliyun主机,当然要用docker来部署我的服务器啦。但是今天碰到了题目的问题,细节如下:# docker info FATA[0000] Cannot connect to the...
  • lincyang
  • lincyang
  • 2015-03-09 17:38:26
  • 127879

docker容器Cannot connect to the Docker daemon. Is the docker daemon running on this host?解决方法。

linux版本:Ubuntu16.04 第一次安装Docker,运行docker命令是可以的,如 docker ps 重启系统之后,运行docker ps后出现如下报错: Cannot conne...
  • hejjiiee
  • hejjiiee
  • 2016-12-07 19:29:24
  • 12912

docker daemon远程连接设置

Docker为C/S架构,服务端为docker daemon,客户端为docker.service.支持本地unix socket域套接字通信与远程socket通信。默认为本地unix socket通...
  • qq_37467907
  • qq_37467907
  • 2018-03-13 15:21:53
  • 265

Docker--安装及遇到的问题

1 Docker在Centos7下的安装,官网教程:https://docs.docker.com/engine/installation/linux/docker-ce/centos/#instal...
  • BtWangZhi
  • BtWangZhi
  • 2017-07-26 00:37:25
  • 2032

docker 的安装以及常见使用的命令

docker介绍docker主要由 镜像,容器,仓库组成。 镜像(Image)是一个只读模板,用来运行Docker容器。 容器(Container)负责应用程序的运行,包括操作系统、用户添加的文件...
  • liujingqiu
  • liujingqiu
  • 2017-07-03 10:17:54
  • 479

mac osx运行docker出现Cannot connect to the Docker daemon. Is the docker daemon running on this host?

其实很简单,但是自己是第一次用,所以找了很久才找到解决办法 mac osx 下可以使用docker toolbox安装docker,安装之后一定要初始化环境变量 运行   docker-machine...
  • lixiaofeng_24
  • lixiaofeng_24
  • 2016-12-13 15:42:47
  • 2483

非root用户出现Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Linux版本:centos  7.4.1708docker版本:1.12.6用yum命令安装完docker后,非root用户运行docker命令的时候老是提示“Cannot connect to t...
  • doraxmon
  • doraxmon
  • 2018-02-10 17:27:40
  • 61

Cannot connect to the Docker daemon

安装docker:brew install docker运行:docker run -d -p 80:80 --name webserver nginx报错:docker: Cannot connec...
  • tymatlab
  • tymatlab
  • 2017-12-07 10:12:17
  • 132
    个人资料
    专栏达人 持之以恒
    等级:
    访问量: 29万+
    积分: 3865
    排名: 1万+
    个人简介
    玩在线教育,个性化学习,教育诊断工具;
    探索将推荐系统,机器学习,人工智能,深度学习应用于在线教育中!
    感谢关注博客,探索学习编程的个性化之路!联系我:liaopanblog@gmail.com
    博客专栏
    最新评论