cki_tools.bootc_containerfile_render

bootc containerfile generation using Jinja2
$ python -m cki_tools.bootc_containerfile_render --help
usage: __main__.py [-h] [--supported] [output]

Render bootc containerfile template

positional arguments:
  output       Output path for the rendered file or stdout if not
               specified.

options:
  -h, --help   show this help message and exit
  --supported  Check if the current tree is supported.

The –supported switch checks if the current tree is supported by the tool and exits 0 if it is supported, 1 if not.

The input template can be specified via CONTAINERFILE_TEMPLATE_FILE environment variable. If not specified, the template at cki_tools/bootc_containerfile_render/containerfile.j2 will be used.

The command outputs the rendered Containerfile to stdout except if an output file path is specified.

The variables passed to the template are:

  • CREATION_TIMESTAMP: Creation date and time for the template
  • BASE_IMAGE: Base image for the container. It is selected based on the value of kcidb_tree_name in the pipeline and in the specific case of RHEL, the registry host can be specified using RHEL_IMAGE_REGISTRY environment variable.
  • CKI_KERNEL_REPO: Contains the value of kernel_repofile_url in the pipeline
  • CI_PIPELINE_ID: Pipeline ID
  • CI_JOB_ID: Job ID