summaryrefslogtreecommitdiffstats
path: root/recipes-demo/images
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-01 17:14:05 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-09 03:32:52 +0000
commit79d03d5350c446223c847135c7115a656adc01d9 (patch)
tree4c988222e2de61d49ce592de0d40175ee61400cd /recipes-demo/images
parent0cdb55047d352ccfffcf76d242ca132315bd0659 (diff)
downloadmeta-virtualization-79d03d5350c446223c847135c7115a656adc01d9.tar.gz
container-bundle: add package-based container bundling support
This class creates installable packages that bundle pre-processed container images. When installed via IMAGE_INSTALL, containers are automatically merged into the target image's container storage. Component relationships for bundling a local container: 1. Application Recipe (builds the software) recipes-demo/myapp/myapp_1.0.bb - Compiles application binaries - Creates installable package (myapp) 2. Container Image Recipe (creates OCI image containing the app) recipes-demo/images/myapp-container.bb - inherit image image-oci - IMAGE_INSTALL = "myapp" - Produces: ${DEPLOY_DIR_IMAGE}/myapp-container-latest-oci/ 3. Bundle Recipe (packages container images for deployment) recipes-demo/bundles/my-bundle_1.0.bb - inherit container-bundle - CONTAINER_BUNDLES = "myapp-container:autostart" - Creates installable package with OCI data Flow: application recipe -> container image recipe -> bundle recipe -> IMAGE_INSTALL in host image -> container deployed on target Usage: inherit container-bundle CONTAINER_BUNDLES = "myapp-container:autostart redis-container" CONTAINER_BUNDLES format: source[:autostart-policy] - source: Container IMAGE recipe name or remote registry URL - autostart-policy: Optional (autostart, always, unless-stopped, on-failure) Features: - Auto-generates dependencies on container image recipes (do_image_complete) - Supports remote containers via skopeo (requires CONTAINER_DIGESTS) - Runtime auto-detected from CONTAINER_PROFILE (docker/podman) - Produces OCI directories and metadata for container-cross-install Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-demo/images')
-rw-r--r--recipes-demo/images/autostart-test-container.bb24
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-demo/images/autostart-test-container.bb b/recipes-demo/images/autostart-test-container.bb
new file mode 100644
index 00000000..73a29a49
--- /dev/null
+++ b/recipes-demo/images/autostart-test-container.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Autostart test container"
2DESCRIPTION = "A container for testing autostart functionality. \
3Runs a simple service that logs timestamps continuously."
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
6
7# Inherit from container-app-base for standard container setup
8require recipes-extended/images/container-app-base.bb
9
10# The test service that runs continuously
11CONTAINER_APP = "autostart-test"
12CONTAINER_APP_CMD = "/usr/bin/autostart-test"
13
14# To test autostart, add to local.conf:
15# BUNDLED_CONTAINERS = "autostart-test-container-latest-oci:docker:autostart"
16#
17# Then verify on target:
18# docker ps # Should show container running
19# docker logs autostart-test-container # Should show timestamp logs
20#
21# For Podman:
22# BUNDLED_CONTAINERS = "autostart-test-container-latest-oci:podman:autostart"
23# podman ps
24# podman logs autostart-test-container