Docs about Templates

Are there any docs about templates? I’m just not sure what they do and how to use them. It looks like a shell script at first glance.

LXC templates are indeed shell scripts which are run by lxc-create to generate a container root filesystem.

These days we’re not using them quite as much except for lxc-download and lxc-local combined with the images we publish at https://images.linuxcontainers.org and we’d generally recommend adding support for new distributions to distrobuilder rather than writing new template scripts.

If you do still want to write your own template script, lxc-busybox is probably a good place to start, write your script in /usr/share/lxc/templates and then call it with lxc-create -t NAME -n blah to create a blah container using your template.

I’m pretty new here. I didn’t know about distrobuilder. I see it up here and I’ll check it out too:

Thanks