sillelien / base-alpine

A base Docker image for Alpine Linux with DNS fixes and S6 process manager, suitable for hosting environments like Tutum.co
http://sillelien.com
Apache License 2.0
80 stars 18 forks source link

name resolution broken #5

Open janeczku opened 9 years ago

janeczku commented 9 years ago

I just updated my Dockerfile to sillelienbase-alpine:latest-92. My services fail to resolve any hostname now. I confirmed that something is indeed broken with dnsmasq by opening a console to the running container.

Connectivity OK:

# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=51 time=26.564 ms
64 bytes from 8.8.8.8: seq=1 ttl=51 time=26.606 ms
64 bytes from 8.8.8.8: seq=2 ttl=51 time=26.629 ms

dnsmasq is not resolving any hostname:

# nslookup www.google.com 127.0.0.1
Server:    127.0.0.1
Address 1: 127.0.0.1 localhost

nslookup: can't resolve 'www.google.com': Try again

The config files look good though. Strange.

# cat /etc/dnsmasq-resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
search 624cd394-a36f-417a-99ea-d8c7b770a4ff.local.tutum.io

# cat /etc/resolv.conf
nameserver 127.0.0.1

dnsmasq is indeed running:

# ps aux
PID   USER     TIME   COMMAND
    1 root       0:00 s6-svscan -t0 /var/run/s6/services
   21 root       0:00 s6-supervise s6-fdholderd
  139 root       0:00 s6-supervise dns-hack
  140 root       0:00 s6-supervise dns
  141 root       0:00 s6-supervise haproxy
  142 root       0:00 s6-supervise syslog
  144 root       0:00 syslogd -n -D -O /dev/stdout
  147 root       0:00 sh ./run
  151 root       0:01 dnsmasq --expand-hosts --resolv-file=/etc/dnsmasq-resolv.conf --addn-hosts=/etc/hosts.links --no-daemon
  152 root       0:00 logger
  153 root       0:00 sh ./run
  520 root       0:00 /bin/sh
  656 root       0:00 /usr/local/sbin/haproxy -f /etc/haproxy/haproxy.conf
  668 root       0:00 sleep 30
  669 root       0:00 ps aux
neilellis commented 9 years ago

Sorry to hear this.

So those config files do look correct, when you ran those commands did you use docker exec, could you send me the start up logs for the failing instance and I'll take a look.

janeczku commented 9 years ago

It could be related https://github.com/gliderlabs/docker-alpine/issues/11 I see you implemented the fix mentioned in the this issue - i will try with the new version. I also have a pull request waiting for you with a more straight-forward approach for giving search domain support to musl-libc images. To which branch should i submit the PR? Master or Staging?