My containers run DHCP and this is how I'd obtain the IP. command: lxc-ls --fancy
output: NAME STATE IPV4 IPV6 AUTOSTART ----------------------------------------- CN RUNNING 10.0.3.77 - NO test RUNNING 10.0.3.14 - NO On 11 July 2013 15:45, Robin Monjo <robin.mo...@applidget.com> wrote: > > Hello, > > I need to know the IP address of a running container in order to add a port > forwarding rule with iptables. My containers are build using the default > ubuntu template and use dhcp to obtain an IP. > > I'm able to access the ip by reading the /var/lib/misc/dnsmasq.leases file. > However I'm not sure this is reliable. > > What do you think ? Any better way to do it ? > > Regards, > Robin > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Lxc-users mailing list > Lxc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/lxc-users ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users