-1

I'm running to this error while trying to run zotonic from a docker container (using zotonic/zotonic-dev), It seems that I can't connect to the the internet from the container. I've tried using solutions in My docker container has no internet but none seems to work, or maybe I'm skipping something?

I started it using 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]
Cen
  • 19
  • 7
  • Which docker image did you use and can you add to the post exactly how you started it? Was it zotonic/zotonic or something else? Also, did you know you can connect to container and debug from inside, including installation of missing things? Command is: docker exec -it "id of your container" bash – isp-zax Nov 18 '17 at 05:17
  • Are you running behind a proxy? – yamenk Nov 18 '17 at 17:15
  • @isp-zax I'm using zotonic/zotonic-dev and run it using `docker-compose run --service-ports zotonic sh` | @yamenk no, I'm not using any proxy – Cen Nov 19 '17 at 11:52
  • @AvicennaWisesa, I didn't realise your docker-compose puts you right into the image bash already. Can you try something simpler instead of running bin/zotonic debug. For example, does ping google.com work? If not, you are right and internet connection isn't present. Since you probably already restarted docker daemon I would try to reinstall docker using curl (https://serverfault.com/questions/722466/uninstall-docker-when-installed-via-curl) and if no success, to debug internet connection from inside the image (https://ubuntuforums.org/showthread.php?t=25557). – isp-zax Nov 20 '17 at 07:37
  • @isp-zax I reinstalled it and it works! thanks – Cen Nov 21 '17 at 03:40

1 Answers1

-1

While restarting docker doesn't work, I solved it by reinstalling docker using curl like @isp-zax said.

Cen
  • 19
  • 7