docker安装后出现Cannot connect to the Docker daemon.
给我你的怀抱
给我你的怀抱 2017-04-24 15:59:19
0
6
1259

系统:ubuntu16.04
我是按照docker的文档上安装的 https://docs.docker.com/linux/step_one/
安装完成后docker的ps pull search run命令都会报这个错 Cannot connect to the Docker daemon. Is the docker daemon running on this host?

在文档上看到让我检查 DOCKER_HOST 这环境变量,然而我并不知道在哪检查

给我你的怀抱
给我你的怀抱

reply all(6)
阿神

I also had a similar error.
Because, I forgot to start the docker service.
service docker start

習慣沉默

Please usesudo

巴扎黑

You need to add user into docker group. by 'sudo gpasswd -a xxxx docker' (xxx is your user name)
Then restart your computer.
This problem should be solved.

Ty80

docker-machine restart&&eval "$(docker-machine env default)"&&docker-machine env just run this sequence

世界只因有你
  • Look at the default configuration of docker startup/etc/default/docker没问题呗,然后重启服务service docker restart.

  • sudo docker -H unix:///var/run/docker.sock -d &
    Use -H to change the docker process to listen to the specified IP and port. By default, docker will listen to unix:///var/run/docker.sock and only allow local root users to connect. You can refer to "Docker Tutorial-Learn Basic Commands"

  • Reinstall docker.

阿神

su root # First switch to the root user, and then execute the following command
systemctl enable docker # Automatically start docker at boot

systemctl start docker # Start docker
systemctl restart docker # Restart docker

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template