kiwi.container.setup Package

Submodules

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

Attributes

  • root_dir

    root directory path name

  • custom_args

    dict of custom arguments

create_fstab()[source]

Container boot mount setup

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

deactivate_bootloader_setup()[source]

Container bootloader setup

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

deactivate_root_filesystem_check()[source]

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

deactivate_systemd_service(name)[source]

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

get_container_name()[source]

Container name

Returns

name

Return type

str

post_init(custom_args)[source]

Post initialization method

Implementation in specialized container setup class

Parameters

custom_args (list) – unused

setup()[source]

Setup container metadata

Implementation in specialized bootloader class required

setup_root_console()[source]

Container console setup

/dev/console should be allowed to login by root

setup_static_device_nodes()[source]

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