host: Don't use IPv6 nameservers inside containers

Closes #474 
This should check `len(line) > 0` in case the line is empty.