启动容器时无法连接到docker守护程序,但是docker info会返回信息

时间:2017-01-26 22:53:26

标签: docker ubuntu-15.10 eclipse-che

过去几天我一直试图使用docker在我的一台服务器上安装eclipse。我的docker守护进程在一个单独的屏幕上运行,其默认主机为unix:///var/run/docker.sock(我没有设置这个,我只运行' docker -d &#39)。测试以确保我可以连接到docker守护程序,我运行了#docker info'并且给出了标准输出,没有错误。

尝试使用命令' docker run -it -rm -e DOCKER_HOST = unix:///var/run/docker.sock eclipse / che start创建/启动eclipse che容器'我收到错误' 无法连接到Docker守护程序。 docker守护程序是否在此主机上运行?'。奇怪的是,无论我在上一个命令中为 DOCKER_HOST 设置什么,该命令仍然会运行,即使变量设置为空(例如' docker run -it - -rm -e DOCKER_HOST = eclipse / che start ')这让我认为这是问题的根源。此外,在运行上一个命令时,docker守护程序确实会报告与che相关的某种操作(尽管我并不真正了解正在发生的事情):

INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
INFO[0000] +job init_networkdriver()
INFO[0000] -job init_networkdriver() = OK (0)
WARN[0000] Your kernel does not support cgroup swap limit.
INFO[0000] Loading containers: start.

INFO[0000] Loading containers: done.
INFO[0000] docker daemon: 1.6.2 7c8fca2; execdriver: native-0.2; graphdriver: aufs
INFO[0000] +job acceptconnections()
INFO[0000] -job acceptconnections() = OK (0)
INFO[0000] Daemon has completed initialization
INFO[0093] POST /v1.18/containers/create
INFO[0093] +job create()
INFO[0093] +job log(create, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest)
INFO[0093] -job log(create, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest) = OK (0)
INFO[0093] -job create() = OK (0)
INFO[0093] POST /v1.18/containers/7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb/attach?stderr=1&stdin=1&stdout=1&stream=1
INFO[0093] +job container_inspect(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0093] -job container_inspect(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0093] +job attach(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0093] POST /v1.18/containers/7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb/start
INFO[0093] +job start(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0093] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers : [nameserver 8.8.8.8 nameserver 8.8.4.4]
INFO[0093] +job allocate_interface(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0093] -job allocate_interface(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0093] +job log(start, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest)
INFO[0093] -job log(start, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest) = OK (0)
INFO[0093] -job start(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0093] POST /v1.18/containers/7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb/resize?h=66&w=230
INFO[0093] +job resize(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, 66, 230)
INFO[0093] -job resize(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, 66, 230) = OK (0)
INFO[0093] +job log(die, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest)
INFO[0093] -job log(die, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest) = OK (0)
INFO[0093] -job attach(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0093] +job release_interface(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0093] -job release_interface(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0093] POST /v1.18/containers/7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb/wait
INFO[0093] +job wait(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0094] -job wait(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0094] GET /v1.18/containers/7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb/json
INFO[0094] +job container_inspect(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0094] -job container_inspect(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0094] DELETE /v1.18/containers/7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb?v=1
INFO[0094] +job rm(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb)
INFO[0094] +job log(destroy, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest)
INFO[0094] -job log(destroy, 7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb, eclipse/che:latest) = OK (0)
INFO[0094] -job rm(7a5d00f69586306f95e98f752fb84c9dfe8e5c959d66b35a8125934dbb174dfb) = OK (0)
INFO[0338] GET /v1.18/info
INFO[0338] +job info()
INFO[0338] +job subscribers_count()
INFO[0338] -job subscribers_count() = OK (0)
INFO[0338] +job registry_config()
INFO[0338] -job registry_config() = OK (0)
INFO[0338] -job info() = OK (0)

我以前的谷歌搜索没有解决我的问题。我在docker组中,我已经注销并重新登录,我显然已经手动启动了该守护进程。还有一点需要提一下,我正在运行Ubuntu 15.10,并且已经运行了(我尝试过禁用)。

0 个答案:

没有答案