博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Ubuntu Docker安装运行出错Cannot connect to the Docker daemon
阅读量:6113 次
发布时间:2019-06-21

本文共 2519 字,大约阅读时间需要 8 分钟。

hot3.png

win10@iZ23a3096aqZ:~$ docker versionClient: Version:      1.11.2 API version:  1.23 Go version:   go1.5.4 Git commit:   b9f10c9 Built:        Wed Jun  1 21:47:50 2016 OS/Arch:      linux/amd64Cannot connect to the Docker daemon. Is the docker daemon running on this host?win10@iZ23a3096aqZ:~$ docker run hello-worlddocker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.See 'docker run --help'.

解决方法:

因为我是非root用户,因此需要让你的用户和docker同属于一个组(docker所在的组名一般为docker),可以用 usermod 命令添加到docker组

sudo usermod -aG docker win10

然后登出用户 ctrl+d

重新登陆

再运行一下 docker version

Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-65-generic x86_64)  * Documentation:  https://help.ubuntu.com/ Welcome to aliyun Elastic Compute Service! Last login: Fri Jun 17 00:05:03 2016 from 222.44.84.3win10@iZ23a3096aqZ:~$ docker version Client: Version:      1.11.2 API version:  1.23 Go version:   go1.5.4 Git commit:   b9f10c9 Built:        Wed Jun  1 21:47:50 2016 OS/Arch:      linux/amd64 Server: Version:      1.11.2 API version:  1.23 Go version:   go1.5.4 Git commit:   b9f10c9 Built:        Wed Jun  1 21:47:50 2016 OS/Arch:      linux/amd64

再跑一下hello world

win10@iZ23a3096aqZ:~$ docker run hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-worlda9d36faac0fe: Pull complete Digest: sha256:e52be8ffeeb1f374f440893189cd32f44cb166650e7ab185fa7735b7dc48d619Status: Downloaded newer image for hello-world:latest Hello from Docker.This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the    executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it    to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker Hub account: https://hub.docker.com For more examples and ideas, visit: https://docs.docker.com/engine/userguide/

参考:

http://www.leesven.com/2338.html

https://segmentfault.com/q/1010000005040763

http://blog.163.com/s2006203387@126/blog/static/533199572015111703735423/

http://www.docker.org.cn/book/install/run-docker-without-sudo-30.html

转载于:https://my.oschina.net/u/1260221/blog/799548

你可能感兴趣的文章
Oracle中的spfile和pfile
查看>>
编译安装MariaDB 及系统初始化
查看>>
静态static成员变量、函数
查看>>
Cacti+Nagios(三):安装Nagios
查看>>
sshd服务
查看>>
免费制冷:数据中心节能系统最佳实践
查看>>
Spring事务管理
查看>>
SSH限制IP登录与禁止多次尝试
查看>>
二维码生成类分享
查看>>
深入Android开发之--理解View#onTouchEvent
查看>>
快来给宝宝打分
查看>>
vue-lazyload源码分析
查看>>
Hive1.0.0安装
查看>>
你所听到的技术原理、技术本质到底是什么?
查看>>
BGP笔记(一)
查看>>
拷贝构造函数是必须要带引用类型的参数的, 而且这也是编译器强制性要求的...
查看>>
VMware中centos6.5mini设置静态IP
查看>>
Linux文件查找之find详解
查看>>
iptables nat表转发
查看>>
App自动化测试必备之adb使用
查看>>