diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-02-27 11:46:34 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-02-27 11:46:34 -0500 |
| commit | 832a0f1e10af43a8006eb84910ceee4472c5d3ab (patch) | |
| tree | feebe29e322543b8d8ffe2a07837392765872b55 | |
| parent | 29c60173e2326ba970d15e7b419601f92f447166 (diff) | |
| download | meta-virtualization-832a0f1e10af43a8006eb84910ceee4472c5d3ab.tar.gz | |
containers: introduce sample/reference container-base image type
container-base is a sample/reference image type that uses the
newly integrated image-oci image type to directly create OCI
compatible images from a build.
This image type can be inherited and extended to implement more
complex container types, with modified image configurations.
It is inspired by / based off the samples in the presentation
done by Scott Murray (Building Container Images with
OpenEmbedded and the Yocto Project) at ELCe 2018.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-extended/images/container-base.bb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-extended/images/container-base.bb b/recipes-extended/images/container-base.bb new file mode 100644 index 00000000..3e636cad --- /dev/null +++ b/recipes-extended/images/container-base.bb | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # | ||
| 2 | # Based on examples from Scott Murray (Building Container Images with | ||
| 3 | # OpenEmbedded and the Yocto Project) ELCe 2018 | ||
| 4 | # | ||
| 5 | SUMMARY = "Basic container image" | ||
| 6 | LICENSE = "MIT" | ||
| 7 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
| 8 | |||
| 9 | IMAGE_FSTYPES = "container oci" | ||
| 10 | inherit image | ||
| 11 | inherit image-oci | ||
| 12 | |||
| 13 | IMAGE_FEATURES = "" | ||
| 14 | IMAGE_LINGUAS = "" | ||
| 15 | NO_RECOMMENDATIONS = "1" | ||
| 16 | |||
| 17 | IMAGE_INSTALL = " \ | ||
| 18 | base-files \ | ||
| 19 | base-passwd \ | ||
| 20 | netbase \ | ||
| 21 | " | ||
| 22 | |||
| 23 | # Workaround /var/volatile for now | ||
| 24 | ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; " | ||
| 25 | rootfs_fixup_var_volatile () { | ||
| 26 | install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp | ||
| 27 | install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log | ||
| 28 | } | ||
