Cannot ping container


I’m a cyber security student and new to Linux. I created 3 containers in Debian. I cannot install nano or ipututils-ping in my container1. I get the error “Temporary failure resolving '”. Can anyone advise as to what I’m doing wrong. Do I need to add a static IP address for each container?


this is kind of a guess answer … yes. i’m still a noob on containers. but in my early reading people have done static addressing in containers to get things working. if names and/or MAC addresses are sufficiently differentiated, then i would think DHCP should accomplish the task. however, if your ISP is your upstream DHCP source then it might not work. if you have an upstream NAT then it should be doing DHCP in private IP space and it should work as long as your bridge isn’t filtering it.

You need to setup a DNS entry. I am not familiar with plain LXC; in LXD you get provided with DNS settings so you do not need to configure manually.

You can manually add a DNS server in /etc/resolve.conf

so, if one does not configure DNS manually, what happens? is this for authoritative DNS or for resolving DNS?

You do not have to configure DNS manually via /etc/resolv.conf, it is quite commonly done via DHCP. But if you have no DNS configured at all the resolver will only use /etc/hosts and if there is no suitable translation it will just fail that attempt.

Thanks. I started the whole process over and everything works now.