[Lxc-users] An application container for apache?
Sergio Daniel Troiano
sergio.troiano at elserver.com
Wed Jan 26 11:50:07 UTC 2011
Hi Patrick,
you can use the root mount point ("/") or create your own
root-mount-point, I prefered to use my own mount point called
"/container/" .
Within container's direrctory i copied all the necessary dirs and files
(/usr/, /etc/ , /bin ....).
Remember to change config file to change rootfs mount point.
Those dirs and files will be shared but some programs need to run with
their own (no shared) directories.
In this point you can mount (bind mode) them , for example i use to do
it creating a folder called "/webvirtualX", within it i've created
no-shared dirs such as apache logs, fcgid sockets, and so on .
Sergio D. Troiano
Development Team.
Av. de los Incas 3085
(C1426ELA) Capital Federal
On Wed, 2011-01-26 at 11:21 +0100, Patrick Westphal wrote:
> 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.
>
>
> Best regards
>
> Patrick
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________ Lxc-users mailing list Lxc-users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110126/8c680059/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elserver.gif
Type: image/gif
Size: 1027 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110126/8c680059/attachment.gif>
More information about the lxc-users
mailing list