diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-10 04:33:48 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-10 21:04:20 +0000 |
| commit | 6f53d7763906f24d86e89da4da744421c52d591c (patch) | |
| tree | f37ff082e424b1e4aaa820c8e2db07b31146f091 /recipes-extended/builder-container-config/builder-container-config_1.0.bb | |
| parent | a71e7b0499c51c74686e41e7810e2f202d851ce6 (diff) | |
| download | meta-virtualization-6f53d7763906f24d86e89da4da744421c52d591c.tar.gz | |
container-yocto-builder: add Yocto build container with systemd
Multi-layer OCI container image that can compile the Yocto Project.
Three layers: systemd-base, build-tools, yocto-extras. Features
CROPS-style dynamic user creation matching /workdir volume owner
UID/GID.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/builder-container-config/builder-container-config_1.0.bb')
| -rw-r--r-- | recipes-extended/builder-container-config/builder-container-config_1.0.bb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-extended/builder-container-config/builder-container-config_1.0.bb b/recipes-extended/builder-container-config/builder-container-config_1.0.bb new file mode 100644 index 00000000..6b023caa --- /dev/null +++ b/recipes-extended/builder-container-config/builder-container-config_1.0.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | SUMMARY = "Entrypoint and user configuration for Yocto builder container" | ||
| 2 | DESCRIPTION = "CROPS-style entrypoint script that creates a builder user \ | ||
| 3 | matching the /workdir mount owner, then hands off to systemd." | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 6 | |||
| 7 | SRC_URI = "file://builder-entry.sh" | ||
| 8 | |||
| 9 | S = "${UNPACKDIR}" | ||
| 10 | RDEPENDS:${PN} = "bash sudo shadow" | ||
| 11 | |||
| 12 | inherit allarch | ||
| 13 | |||
| 14 | do_install() { | ||
| 15 | # Entrypoint script (CROPS-style user creation -> exec /sbin/init) | ||
| 16 | install -d ${D}${bindir} | ||
| 17 | install -m 0755 ${UNPACKDIR}/builder-entry.sh ${D}${bindir}/ | ||
| 18 | |||
| 19 | # Create /workdir mount point | ||
| 20 | install -d ${D}/workdir | ||
| 21 | } | ||
| 22 | |||
| 23 | FILES:${PN} = "${bindir}/builder-entry.sh /workdir" | ||
