kiwi.container.setup Package


kiwi.container.setup.base Module

class kiwi.container.setup.base.ContainerSetupBase(root_dir, custom_args=None)[source]

Bases: object

Base class for setting up the root system to create a container image from for e.g docker. The methods here are generic to linux systems following the FHS standard and modern enough e.g based on systemd


  • root_dir
    root directory path name
  • custom_args
    dict of custom arguments

Container boot mount setup

Initialize an empty fstab file, mount processes in a container are controlled by the container infrastructure


Container bootloader setup

Tell the system there is no bootloader configuration it needs to care for. A container does not boot


Container filesystem check setup

The root filesystem of a container could be an overlay or a mapped device. In any case it should not be checked for consistency as this is should be done by the container infrastructure


Container system services setup

Init systems among others also controls services which starts at boot time. A container does not really boot. Thus some services needs to be deactivated

Parameters:name (string) – systemd service name

Container name

Return type:str

Post initialization method

Implementation in specialized container setup class

Parameters:custom_args (list) – unused

Setup container metadata

Implementation in specialized bootloader class required


Container console setup

/dev/console should be allowed to login by root


Container device node setup

Without subsystems like udev running in a container it is required to provide a set of device nodes to let the system in the container function correctly. This is done by syncing the host system nodes to the container. That this will also create device nodes which are not necessarily present in the container later is a know limitation of this method and considered harmless

kiwi.container.setup.docker Module

class kiwi.container.setup.docker.ContainerSetupDocker(root_dir, custom_args=None)[source]

Bases: kiwi.container.setup.oci.ContainerSetupOCI

Docker container setup

Module Contents

class kiwi.container.setup.ContainerSetup[source]

Bases: object

container setup factory