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

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

kiwi.container.setup.docker Module

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

Bases: ContainerSetupOCI

Docker container setup

Module Contents

class kiwi.container.setup.ContainerSetup[source]

Bases: object

container setup factory

static new(name: str, root_dir: str, custom_args: Dict | None = None)[source]