summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}