diff options
-rw-r--r-- | recipes-demo/images/app-container.bb | 38 |
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" | |||
2 | LICENSE = "MIT" | 2 | LICENSE = "MIT" |
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
4 | 4 | ||
5 | include container-base.bb | 5 | #include container-base.bb |
6 | 6 | ||
7 | OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app" | 7 | OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app" |
8 | CONTAINER_SHELL = "busybox" | 8 | CONTAINER_SHELL = "busybox" |
9 | 9 | ||
10 | IMAGE_INSTALL:append = "helloworld-flask" | 10 | IMAGE_INSTALL:append = "helloworld-flask" |
11 | |||
12 | IMAGE_FSTYPES = "container oci" | ||
13 | inherit image | ||
14 | inherit image-oci | ||
15 | |||
16 | IMAGE_FEATURES = "" | ||
17 | IMAGE_LINGUAS = "" | ||
18 | NO_RECOMMENDATIONS = "1" | ||
19 | |||
20 | IMAGE_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. | ||
36 | CONTAINER_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 | ||
39 | IMAGE_CONTAINER_NO_DUMMY = "1" | ||
40 | |||
41 | # Workaround /var/volatile for now | ||
42 | ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; " | ||
43 | rootfs_fixup_var_volatile () { | ||
44 | install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp | ||
45 | install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log | ||
46 | } | ||