【发布时间】:2018-05-01 22:40:02
【问题描述】:
我在尝试从 docker 容器(使用 zotonic/zotonic-dev)运行 zotonic 时遇到此错误,看来我无法从容器连接到互联网。我已经尝试在My docker container has no internet 中使用解决方案,但似乎没有一个有效,或者我可能跳过了什么?
我使用 docker-compose run --service-ports zotonic sh 启动它
Building Zotonic for the first time.
EXOMETER_PACKAGES="-afunix -netlink -exo +setup" && ./rebar -C rebar.config.lock get-deps
WARN: Missing plugins: [rebar_lock_deps_plugin]
==> zotonic (get-deps)
Pulling goldrush from {git,"git://github.com/DeadZen/goldrush.git",
"71e63212f12c25827e0c1b4198d37d5d018a7fec"}
Cloning into 'goldrush'...
fatal: Unable to look up github.com (port 9418) (Try again)
ERROR: sh(git clone -n git://github.com/DeadZen/goldrush.git goldrush)
failed with return code 128 and the following output:
Cloning into 'goldrush'...
fatal: Unable to look up github.com (port 9418) (Try again)
ERROR: 'get-deps' failed while processing /opt/zotonic: rebar_abort
make: *** [GNUmakefile:40: get-deps] Error 1
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [kernel-poll:true]
【问题讨论】:
-
您使用了哪个 docker 镜像,您能否准确地添加到帖子中?是zotonic/zotonic还是别的什么?另外,您是否知道可以从内部连接到容器并进行调试,包括安装丢失的东西?命令是: docker exec -it "你的容器的 id" bash
-
你在代理后面运行吗?
-
@isp-zax 我正在使用 zotonic/zotonic-dev 并使用
docker-compose run --service-ports zotonic sh运行它 | @yamenk 不,我没有使用任何代理 -
@AvicennaWisesa,我没有意识到您的 docker-compose 已经让您直接进入图像 bash。你可以尝试一些更简单的东西而不是运行 bin/zotonic 调试。例如,ping google.com 是否有效?如果不是,那么您是对的,并且互联网连接不存在。由于您可能已经重新启动了 docker 守护程序,我将尝试使用 curl (serverfault.com/questions/722466/…) 重新安装 docker,如果没有成功,则从映像内部调试 Internet 连接 (ubuntuforums.org/showthread.php?t=25557)。
-
@isp-zax 我重新安装了它,它可以工作了!谢谢
标签: ubuntu docker rebar zotonic