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

Brian K. White brian at aljex.com
Thu Sep 16 16:47:33 UTC 2010


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




More information about the lxc-users mailing list