[lxc-users] Building custom LXC templates

Xavier Gendre gendre.reivax at gmail.com
Mon Apr 18 14:21:29 UTC 2016


Hello Lars,

> However, I have no idea how to do that. Is it possible to create a
> container locally and pack it up to be extracted somewhere else? Would
> that even be portable? If so, is there tooling for that? I use
> configuration management for everything else already; LXC so far is the
> only thing I haven't automated.

You can use the tools provided here:
https://github.com/lxc/lxc-ci

To produce a custom templates, you will have to adapt some file in 
lxc-ci/templates and then run bin/build-image. I did it a lot before to 
get working Debian Jessie containers before lxc 1.1.5 arrived in 
jessie-backports. When you get the custom template and its rootfs, you 
can choose to force the cache to use them or to create a custom template 
server.

Xavier


More information about the lxc-users mailing list