遇到问题:
test:
[exec] Couldn’t connect to Docker daemon at http+unix://var/run/docker.sock - is it running?
[exec]
[exec] If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
[exec] Result: 1
在网上搜了很久,终于解决了。
1. 编辑/etc/default/docker,修改下面的参数为
- 1
- 2
2. 重启 docker 服务
网上都说用
- 1
但是我这里不行,一运行就出现下面的结果
- 1
- 2
我只好重启电脑
3. 检查并确定 Docker 运行在 localhost:4243
- 1
- 2
- 3
4. 设置 DOCKER_HOST 环境变量,可以添加到 ~/.bashrc 文件中
- 1
运行命令
- 1
- 2
- 3
5. 重启电脑,问题解决
多谢博客:http://blog.csdn.net/kongxx/article/details/43481573,很大帮助