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 'httpredir.debian.org”. 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 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.