User:Rhombus/distrobuilder

distrobuilder Article description::is an integration tool used to create [[LXC or LXD container images.]] It takes a YAML-formatted configuration file as input and generates compressed image files which can be imported to a local repository or provided remotely via a repository server.

Kernel
distrobuilder requires overlay filesystem support in order to work.

Additional software
app-emulation/distrobuilder does not include any YAML templates. The upstream templates can be a useful guide when generating custom images. They may be found at github.com/lxc/lxc-ci.

Usage
Like docker, distrobuilder builds images by following definitions from a YAML file.

The YAML template
The upstream Gentoo templates are intentionally kept very slim. What follows are some sensible improvements.

Managing packages
Package management is determined by the section:


 * demarcates the section.
 * tells distrobuilder what package manager the image uses. portage is predefined.
 * If set to, all installed packages are updated at the time the image is created. The upstream templates use the stage 3 tarball and have  , which means the repo directory in the container is empty and   will fail. To avoid this, set.


 * If set to true, the package manager will perform a cleanup operation to which usually cleans up cached files. It is not clear what operation this makes  perform.
 * Contains a list of packages following a bullet point  and the keyword , an  , and optional filters such as   and  .  The packages are defined using standard portage package atoms;   must be set to either   or  . The   determine whether a container or a virtual machine is built; this is set via a switch to distrobuilder at the time of image creation. Similarly,   allow different configurations based on the same base template.