[Lxc-users] An application container for apache?

Patrick Westphal patrick.westphal at inqbus.de
Wed Jan 26 14:33:24 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.
>
Ah - k. See the point. Having a master (skeleton) container gives an 
even better decoupling of the host and a container (than I have 
bind-mounting the host binaries). Didn't think of that. Thanks!




More information about the lxc-users mailing list