Yeah, the only thing you really can't bind-mount as read-only is probably the /var directory since all kinds of runtime stuff goes into there.  However, that directory is usually pretty small anyway (mine is only 4MB).  If you use a debian based distro it's probably important to remove any cached deb files & package listings.<div>
<br><br><div class="gmail_quote">On Wed, Jan 26, 2011 at 6:33 AM, Patrick Westphal <span dir="ltr"><<a href="mailto:patrick.westphal@inqbus.de">patrick.westphal@inqbus.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> Here's mine, if it helps anyone.  I use this for all my containers so<br>
> that I don't need to have a bunch of duplicated files for every lxc<br>
> container running on my system:<br>
><br>
> lxc.mount.entry=proc /var/lib/lxc/squeeze1/rootfs/proc proc<br>
> nodev,noexec,nosuid 0 0<br>
> lxc.mount.entry=devpts /var/lib/lxc/squeeze1/rootfs/dev/pts devpts<br>
> defaults 0 0<br>
> lxc.mount.entry=sysfs /var/lib/lxc/squeeze1/rootfs/sys sysfs defaults  0 0<br>
> lxc.mount.entry=/opt /var/lib/lxc/squeeze1/rootfs/opt none bind,ro 0 0<br>
> lxc.mount.entry=/lessfs/squeeze/rootfs/bin<br>
> /var/lib/lxc/squeeze1/rootfs/bin none bind,ro 0 0<br>
> lxc.mount.entry=/lessfs/squeeze/rootfs/boot<br>
> /var/lib/lxc/squeeze1/rootfs/boot none bind,ro 0 0<br>
> lxc.mount.entry=/lessfs/squeeze/rootfs/lib<br>
> /var/lib/lxc/squeeze1/rootfs/lib none bind,ro 0 0<br>
> lxc.mount.entry=/lessfs/squeeze/rootfs/lib64<br>
> /var/lib/lxc/squeeze1/rootfs/lib64 none bind,ro 0 0<br>
> lxc.mount.entry=/lessfs/squeeze/rootfs/sbin<br>
> /var/lib/lxc/squeeze1/rootfs/sbin none bind,ro 0 0<br>
> lxc.mount.entry=/lessfs/squeeze/rootfs/usr<br>
> /var/lib/lxc/squeeze1/rootfs/usr none bind,ro 0 0<br>
><br>
> For my system in /lessfs/squeeze/rootfs, I can upgrade it and simply<br>
> reboot one of my containers and have all their binaries upgraded as well.<br>
><br>
</div>Ah - k. See the point. Having a master (skeleton) container gives an<br>
even better decoupling of the host and a container (than I have<br>
bind-mounting the host binaries). Didn't think of that. Thanks!<br>
<div><div></div><div class="h5"><br>
------------------------------------------------------------------------------<br>
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!<br>
Finally, a world-class log management solution at an even better price-free!<br>
Download using promo code Free_Logger_4_Dev2Dev. Offer expires<br>
February 28th, so secure your free ArcSight Logger TODAY!<br>
<a href="http://p.sf.net/sfu/arcsight-sfd2d" target="_blank">http://p.sf.net/sfu/arcsight-sfd2d</a><br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
</div></div></blockquote></div><br></div>