1

I am trying to set the dns manually to a lxc container. I already read your comments on [Setting up bridged LXC containers with static IPs But this did not work with me.

In etc/network/interfaces inside the container I tried:

auto eth0

iface eth0 inet manual

and I tried

auto eth0

iface eth0 inet static

address 10.1.5.2

netmask 255.255.255.0

gateway 10.1.5.1

dns-nameservers 8.8.8.8

But this did not work. I still have dns problems that I still receive the foloowing message when using apt-get

Temporary failure resolving 'archive.ubuntu.com'

1

Just get it ...

In the container all what we need is to add dns to /etc/resolv.conf

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

  • Please accept your own answer to mark this question as "solved" – Thomas Berger Jul 24 '18 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.