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





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


Just get it ...

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

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

  • Please accept your own answer to mark this question as "solved" Jul 24, 2018 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.