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'

YOUSEF
  • 11
  • 1

1 Answers1

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

Yousef
  • 11
  • 1