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 Answer 1

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

1
  • Please accept your own answer to mark this question as "solved" Jul 24, 2018 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .