[Lxc-users] Launch multiple apps in exactly on container

Daniel Lezcano daniel.lezcano at free.fr
Thu Sep 16 10:05:44 UTC 2010


On 09/16/2010 10:56 AM, Jue Hong wrote:
> Sure Daniel, what you say actually works. But I still want to know,
> whether I can launch another app into a running container.
>
> Doing as you say:
>    
>> lxc-execute -n foo /bin/bash  -- this bash runs inside container 'foo'
>> lxc-execute -n bar /bin/bash  -- this bash runs inside container 'bar'
>>      
> the 2nd bash will run in a different container named 'bar': e.g.
> /dev/cgroup/bar.
> What if I want to launch another app, like helloworld, inside the
> first running container 'foo'?
>    

Ah, ok. Sorry I misunderstood your question. This is not yet supported 
because there is a missing feature in the kernel.
Hopefully, the kernel modification providing this functionality is ready 
and the author said he will submit it this week or next week, so that 
will be possible in a near future.

This feature is very important because it allows build a set of scripts 
to facilitate container management from the outside like shutdown, 
netstat, etc ...

If you wish to experiment this feature, it is available at:

http://lxc.sourceforge.net/patches/linux/

and the command using it is lxc-attach, which is already available with 
the 0.7.2 version.

At this point, it's experimental but very usable. I will be happy to 
have feedbacks ;)

Thanks
   -- Daniel










More information about the lxc-users mailing list