[lxc-users] adding lxc containers to local DNS

Serge Hallyn serge.hallyn at ubuntu.com
Wed Jul 2 15:18:21 UTC 2014


Quoting Bill Smith (william.m.smith at gmail.com):
> On Centos and/or Ubuntu, is there a way to configure the host's DNS so that
> the containers mapped in dnsmasq.leases are resolvable by nslookup?  I know
> I could get there by assigning static IPs and adding them to /etc/hosts.
>  I'm wondering whether it's possible for the host to use the usual C
> runtime to map a container name to an IP address without having to specify
> the mapping in /etc/hosts.
> 
> Bill Smith

See the Networking section in https://help.ubuntu.com/14.04/serverguide/lxc.html

In particular, I add the line server=/lxc/10.0.3.1 to /etc/dnsmasq.conf

-serge


More information about the lxc-users mailing list