[Lxc-users] An application container for apache?

Dean Mao deanmao at gmail.com
Wed Jan 26 14:07:20 UTC 2011


Here's mine, if it helps anyone.  I use this for all my containers so that I
don't need to have a bunch of duplicated files for every lxc container
running on my system:

lxc.mount.entry=proc /var/lib/lxc/squeeze1/rootfs/proc proc
nodev,noexec,nosuid 0 0
lxc.mount.entry=devpts /var/lib/lxc/squeeze1/rootfs/dev/pts devpts defaults
0 0
lxc.mount.entry=sysfs /var/lib/lxc/squeeze1/rootfs/sys sysfs defaults  0 0
lxc.mount.entry=/opt /var/lib/lxc/squeeze1/rootfs/opt none bind,ro 0 0
lxc.mount.entry=/lessfs/squeeze/rootfs/bin /var/lib/lxc/squeeze1/rootfs/bin
none bind,ro 0 0
lxc.mount.entry=/lessfs/squeeze/rootfs/boot
/var/lib/lxc/squeeze1/rootfs/boot none bind,ro 0 0
lxc.mount.entry=/lessfs/squeeze/rootfs/lib /var/lib/lxc/squeeze1/rootfs/lib
none bind,ro 0 0
lxc.mount.entry=/lessfs/squeeze/rootfs/lib64
/var/lib/lxc/squeeze1/rootfs/lib64 none bind,ro 0 0
lxc.mount.entry=/lessfs/squeeze/rootfs/sbin
/var/lib/lxc/squeeze1/rootfs/sbin none bind,ro 0 0
lxc.mount.entry=/lessfs/squeeze/rootfs/usr /var/lib/lxc/squeeze1/rootfs/usr
none bind,ro 0 0

For my system in /lessfs/squeeze/rootfs, I can upgrade it and simply reboot
one of my containers and have all their binaries upgraded as well.


On Wed, Jan 26, 2011 at 5:31 AM, Patrick Westphal <
patrick.westphal at inqbus.de> wrote:

> Hi Sergio,
>
> >
> > you can use the root mount point ("/") or create your own
> > root-mount-point, I prefered to use my own mount point called
> > "/container/" .
>
> So do I. :)
>
> > 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.
>
> OK. But 'shared' in this case means 'shared once' not 'shared forever',
> doesn't it? I mean if you just copy the corresponding directories, you
> will have to do e.g. security updates once for every container.
> I just set up the (/usr-, /bin-, /sbin-, ...) bind-mounts (read only) to
> (hopefully) keep the system maintainable for a larger number of
> containers. So I could install additional software once for all of them.
> Let's see if that works. ;)
>
> >
> > 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 .
>
> So do I, too. (Except that I do not bind-mount them but give them a
> dedicated directory tree.)
>
>
> Thanks and 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/8b0ba555/attachment.html>


More information about the lxc-users mailing list