0

在过去的几天里,我一直在尝试使用 docker 在我的一台服务器上安装 eclipse che。我的 docker 守护程序在一个单独的屏幕上运行,默认主机为 unix:///var/run/docker.sock(我没有设置这个,我只运行了“ docker -d ”)。测试以确保我可以连接到 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 上运行,并且正在运行 ufw(我已尝试禁用)。

4

0 回答 0