diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-01 17:08:35 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-09 03:32:52 +0000 |
| commit | c32e1081c81ba27f0d5a21a1885601f04d329d21 (patch) | |
| tree | a7e44880e69068d44e7e89d49af8ce709784a03f /recipes-devtools/python | |
| parent | 79d03d5350c446223c847135c7115a656adc01d9 (diff) | |
| download | meta-virtualization-c32e1081c81ba27f0d5a21a1885601f04d329d21.tar.gz | |
container-cross-install: add bbclass for bundling containers into images
This class enables bundling pre-built OCI containers into Yocto images
at build time. It uses vdkr/vpdmn to process containers via QEMU,
producing properly formatted storage that can be merged into the
target rootfs.
Two mechanisms for bundling containers:
1. BUNDLED_CONTAINERS variable (direct specification):
- Set in local.conf or image recipe
- Format: "name:runtime[:autostart][:external]"
- Dependencies auto-generated at parse time
- Example: BUNDLED_CONTAINERS = "container-base:docker:autostart"
2. container-bundle packages (package-based):
- Recipes inherit container-bundle.bbclass to create packages
- Installing packages via IMAGE_INSTALL triggers processing
- merge_installed_bundles() scans installed OCI directories
- Runs vrunner once in batch-import mode for efficiency
Automatic dependency generation for BUNDLED_CONTAINERS:
- Parses entries at recipe parse time via python __anonymous()
- Derives recipe name from OCI dir names (strips -latest-oci/-oci suffix)
- Generates do_rootfs[depends] on recipe:do_image_complete
- Use :external tag to skip dependency for third-party blobs
- Single "bitbake container-image-host" builds containers + image
Usage in image recipe:
inherit container-cross-install
Features:
- Automatic detection of target architecture
- Support for both Docker and Podman runtimes
- Batch import mode for efficiency with multiple containers
- Autostart support via systemd services (Docker) or Quadlet (Podman)
- Integration with vrunner for QEMU-based processing
- Backwards compatible with legacy -latest-oci naming convention
The class processes containers during do_rootfs and merges the
resulting storage into /var/lib/docker or /var/lib/containers.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-devtools/python')
0 files changed, 0 insertions, 0 deletions
