[Lxc-users] An application container for apache?

Serge E. Hallyn serge.hallyn at canonical.com
Wed Jan 26 14:08:28 UTC 2011


Quoting Patrick Westphal (patrick.westphal at inqbus.de):
> Am 20.01.2011 16:29, schrieb Sergio Daniel Troiano:
> >Andre,
> >
> >I'm using Slackware and i've compiled lxc-7.2 because when i tried
> >to use lxc-7.3 i couldnt mount anything within the container.
> >
> >You have to create a root enviroment , i use /container, here are
> >all shared files and directories (/usr, /bin, /etc and so on)
> >besides you must create no-shared directories (for example apache
> >logs) you'll mount them when you start the container.
> >
> >[...]
> >
> >## Apache logs, fcgid
> >/home/skel.containers/web/usr/local/apache2/logs
> >/container/usr/local/apache2/logs  bind  defaults,bind  0 0
> >## Apache conf
> >/home/skel.containers/web/usr/local/apache2/conf
> >/container/usr/local/apache2/conf  bind  defaults,bind  0 0
> >none /container/proc proc defaults 0 0
> >none /container/dev/pts devpts newinstance 0 0
> >
> Hi Sergio,
> 
> 
> there's one thing I didn't get: How do you share the /usr, /bin,
> /sbin, ... dirs?
> 
> I'm playing around with a similar setup bind-mounting the
> corresponding directories from the host into the containers. But I
> can't see such mounts in your config.fstab. Now I'm wondering if
> there's an other/a better way to do this.

Perhaps he does the bind-mounting in advance (i.e. at *host* startup).

That's how I read his response, though he didn't say so explicitly.

-serge




More information about the lxc-users mailing list