summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2019-02-27 11:46:34 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-02-27 11:46:34 -0500
commit832a0f1e10af43a8006eb84910ceee4472c5d3ab (patch)
treefeebe29e322543b8d8ffe2a07837392765872b55
parent29c60173e2326ba970d15e7b419601f92f447166 (diff)
downloadmeta-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.bb28
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#
5SUMMARY = "Basic container image"
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8
9IMAGE_FSTYPES = "container oci"
10inherit image
11inherit image-oci
12
13IMAGE_FEATURES = ""
14IMAGE_LINGUAS = ""
15NO_RECOMMENDATIONS = "1"
16
17IMAGE_INSTALL = " \
18 base-files \
19 base-passwd \
20 netbase \
21"
22
23# Workaround /var/volatile for now
24ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; "
25rootfs_fixup_var_volatile () {
26 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp
27 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log
28}