Closed rlue closed 5 years ago
Try ping GitHub.com from the host
Seems like a DNS issue
Hm... the host can def. reach GitHub:
$ ping github.com
PING github.com (192.30.253.112) 56(84) bytes of data.
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=1 ttl=46 time=230 ms
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=2 ttl=46 time=229 ms
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=3 ttl=46 time=229 ms
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=4 ttl=46 time=229 ms
^C
--- github.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 229.061/229.772/230.404/0.676 ms
Seems like a DNS issue
At first, I thought it might have something to do with the fact that the host is also running Pi-Hole, with my router configured to use it as the DNS. But on an x86_64 desktop on the same network, this container runs just fine, and even when I revert the router to its original configuration (Cloudflare DNS at 1.1.1.1 / 1.0.0.1), it still doesn't work on the RPi.
I did a little more digging, and it seems I can get the container to successfully connect to the Internet if I run it in host network mode—but then it actually tries to bind to port 80, which is taken by another container:
$ docker run --net=host -e VIRTUAL_HOST=<domain>.com,www.<domain>.com -v /data/<domain>/html:/usr/html -p 8080:80 yobasystems/alpine-grav
WARNING: Published ports are discarded when using host network mode
2019/05/24 17:43:02 [emerg] 36#36: bind() to 0.0.0.0:80 failed (98: Address in use)
2019/05/24 17:43:02 [notice] 36#36: try again to bind() after 500ms
...
Any idea why it would fail to connect to the Internet in bridge network mode?
Also, I can confirm that all my other containers can access the internet:
$ docker exec <container_name> ping google.com
works for containers based on the following images:
pihole/pihole
alexanderkrause/rpi-letsencrypt-nginx-proxy-companion
braingamer/nginx-proxy-arm
linuxserver/syncthing
nginx
but doesn't work for yobasystems/alpinegrav
:(
Wait! It does appear to be a DNS issue. If I add the option --dns 1.1.1.1 --dns 1.0.0.1
then it works fine!
It's very weird. The contents of /etc/resolv.conf
are the same in all my containers. What would cause this image to use a different DNS from the others?
Not sure as i've just run the same command as you suggested on armhf (Asus Tinkerboard) binding port 80 in the container to 8080 on the host. I can hit the site and i see in the logs it extracting the grav admin .zip.
Just tried starting a container for this image on a Raspberry Pi 3B+, and this is the very first output from the logs:
This was for the command
(Port 80 is occupied on the Raspberry Pi by an existing nginx reverse proxy container.)