[Lxc-users] Container name as DNS name

Serge Hallyn serge.hallyn at canonical.com
Fri Aug 24 17:37:23 UTC 2012


Quoting Ben Butler-Cole (ben at bridesmere.com):
> On 6 July 2012 19:56, Serge Hallyn <serge.hallyn at canonical.com> wrote:
> > Quoting Ben Butler-Cole (ben at bridesmere.com):
> >> For some reason I thought that with the default lxcbr0 config the
> >> containers name would resolve for it as a DNS name. That doesn't seem to be
> >> the case.
> >
> > Do you have 10.0.3.1 (or whatever ip address you have assigned to lxcbr0)
> > added as a nameserver, i.e. in /etc/resolv.conf?
> 
> I don't have 10.0.3.1 in /etc/resolv.conf. That would be good enough,
> and I have put it there by various hacky approches. But I'm not sure,
> with resolvconf controlling /etc/resolv.conf, what the correct way of
> doing this is. Do you have any idea what a sensible way to do it would
> be?

I'd do the same way recommended in
http://wiki.ubuntu.com/SecurityTeam/TestingEnvironment.  Namely, place
it in /etc/resolvconf/resolv.conf.d/head

-serge




More information about the lxc-users mailing list