[lxc-users] How to bring up a container from rootfs tarball

Serge Hallyn serge.hallyn at ubuntu.com
Mon Aug 18 22:08:37 UTC 2014


Quoting Thomas Moschny (thomas.moschny at gmail.com):
> 2014-08-14 7:52 GMT+02:00 Fajar A. Nugraha <list at fajar.net>:
> > If you have your OWN root image (e.g. dump from a server), then it's a
> > different story. Look at each template to see what modifications are needed.
> > For ubuntu, see configure_ubuntu() on /usr/share/lxc/templates/lxc-ubuntu.
> 
> I think that's an interesting point: It would be nice if one could
> call that part of the template script that transforms a 'raw' root fs
> into an lxc-suited root fs separately.
> 
> This would have other advantages, too: for example, when a newer
> version of the template script does some things differently, one could
> use it to 'update' the existing root fs without the need to download
> things again.
> 
> - Thomas

Could you show some examples, from an API user point of view, showing
precisely what effects you would want each stage to have?

The only way I can envision this right now would be to follow a coreos
type of approach, where we have a read-only base with a set of
per-container writeable layers on top.  One would be the 'template
customization', one the 'system customization', and one the 'user
data'.  Unfortunately, practically speaking, if we did this, then
changing the 'template customization 'layer out from under the system
and user data layers would likely invalidate them.

But you may have a better idea in mind.  A clear set of expectations
from the user's POV is usually helpful.

-serge


More information about the lxc-users mailing list