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

Jue Hong honshj at gmail.com
Fri Sep 17 04:55:12 UTC 2010


BKW, you're right. Now we're going to use the method as you say.
But, being able to start apps outside is really convenient in some cases :)

On Fri, Sep 17, 2010 at 12:47 AM, Brian K. White <brian at aljex.com> wrote:
> On 9/16/2010 3:36 AM, Jue Hong wrote:
>> As I understand, running one application with the command lxc-execute
>> will create a container instance. E.g., by running lxc-execute -n foo
>> /bin/bash, a container named foo will be created, and I can find a foo
>> directory under the mounted cgroup directory, like /dev/cgroup/foo.
>> While retype lxc-execute -n foo /bin/bash, I'm told that:lxc-execute:
>> Device or resource busy.
>>
>> Does it mean I cannot run multiple apps within exactly the same
>> container foo via using lxc-execute or lxc-start? Or what should I do
>> if it's possible?
>
> You can run essentially as many apps as you want inside a single
> container, you just can't start them from the outside.
>
> For a single service or app, run lxc-execute ... myapp
>
> For multiple services/apps, run lxc-start , which will run /sbin/init
> inside the container, and init starts up multiple services the same way
> a regular server does.
>
> You could do almost as much with lxc-execute.../bin/bash, but you do it
> from that shell, from inside the container, not by trying to run
> lxc-execute multiple times to create multiple processes.
>
> --
> bkw
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>



-- 
Jue Hong (洪爵)
Department of Network Infrastructure
Tencent Company, Shenzhen, China




More information about the lxc-users mailing list