docker (alpine?) DNS issue ‘bad address’

Well, this just cost me several hours, and I couldn’t find it anywhere else, so let’s start this blog with a note to self:

  • If you’re doing some docker stuff (like building an alpine image) and your docker build fails with some DNS error
  • but your host has no issue resolving the names
  • and your /etc/resolv.conf in both environments look fine (= they are just a list of nameservers)
  • then validate each DNS entry: dig google.com @ip.of.your.nameserver
  • and remove any non-responding entry!

In my case, my last nameserver entry was incorrect, which my host computer had not issue with, but blew up my docker build process every time.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.