summaryrefslogtreecommitdiffstats
path: root/recipes-demo/images
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-09-12 16:22:39 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-09-12 16:45:26 -0400
commitf20516d0fd0ddfb9e2f4d2bdb11ea40ccf575d49 (patch)
treeb608fb469ffed7d650e1ade4028debbaaf21c7a1 /recipes-demo/images
parent4254c4a732c03ea66689f941276ac62aaac6c632 (diff)
downloadmeta-virtualization-f20516d0fd0ddfb9e2f4d2bdb11ea40ccf575d49.tar.gz
app-container: temporarily copy contens of .inc file to recipe
Variable overrides have stopped working when this specific .inc file are used. To keep the demo working, we temporarily copy the exact contents of the .inc file into the recipe .. and all is well. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-demo/images')
-rw-r--r--recipes-demo/images/app-container.bb38
1 files changed, 37 insertions, 1 deletions
diff --git a/recipes-demo/images/app-container.bb b/recipes-demo/images/app-container.bb
index c8798cf0..22d2ab9f 100644
--- a/recipes-demo/images/app-container.bb
+++ b/recipes-demo/images/app-container.bb
@@ -2,9 +2,45 @@ SUMMARY = "Basic Application container image"
2LICENSE = "MIT" 2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4 4
5include container-base.bb 5#include container-base.bb
6 6
7OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app" 7OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app"
8CONTAINER_SHELL = "busybox" 8CONTAINER_SHELL = "busybox"
9 9
10IMAGE_INSTALL:append = "helloworld-flask" 10IMAGE_INSTALL:append = "helloworld-flask"
11
12IMAGE_FSTYPES = "container oci"
13inherit image
14inherit image-oci
15
16IMAGE_FEATURES = ""
17IMAGE_LINGUAS = ""
18NO_RECOMMENDATIONS = "1"
19
20IMAGE_INSTALL = " \
21 base-files \
22 base-passwd \
23 netbase \
24 ${CONTAINER_SHELL} \
25"
26
27# If the following is configured in local.conf (or the distro):
28# PACKAGE_EXTRA_ARCHS:append = " container-dummy-provides"
29#
30# it has been explicitly # indicated that we don't want or need a shell, so we'll
31# add the dummy provides.
32#
33# This is required, since there are postinstall scripts in base-files and base-passwd
34# that reference /bin/sh and we'll get a rootfs error if there's no shell or no dummy
35# provider.
36CONTAINER_SHELL ?= "${@bb.utils.contains('PACKAGE_EXTRA_ARCHS', 'container-dummy-provides', 'container-dummy-provides', 'busybox', d)}"
37
38# Allow build with or without a specific kernel
39IMAGE_CONTAINER_NO_DUMMY = "1"
40
41# Workaround /var/volatile for now
42ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; "
43rootfs_fixup_var_volatile () {
44 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp
45 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log
46}