summaryrefslogtreecommitdiffstats
path: root/recipes-demo
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-09-12 16:18:22 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-09-12 16:45:26 -0400
commitc5ed5aa1e5860f2f8122d3c11388856bf43083b0 (patch)
treec24e03ceb3cb85f4d8bfcf4464802785333e1727 /recipes-demo
parenteb4a659acb00cd5b3c7047490b66b38867724858 (diff)
downloadmeta-virtualization-c5ed5aa1e5860f2f8122d3c11388856bf43083b0.tar.gz
demo: add a sample container that just contains curl
This is useful for demonstrating how entry points and functionality can be delivered in containers Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-demo')
-rw-r--r--recipes-demo/images/app-container-curl.bb46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-demo/images/app-container-curl.bb b/recipes-demo/images/app-container-curl.bb
new file mode 100644
index 00000000..51451300
--- /dev/null
+++ b/recipes-demo/images/app-container-curl.bb
@@ -0,0 +1,46 @@
1SUMMARY = "Curl Application container image"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5IMAGE_FSTYPES = "container oci"
6inherit image
7inherit image-oci
8
9IMAGE_FEATURES = ""
10IMAGE_LINGUAS = ""
11NO_RECOMMENDATIONS = "1"
12
13IMAGE_INSTALL = " \
14 base-files \
15 base-passwd \
16 netbase \
17 ${CONTAINER_SHELL} \
18"
19
20# If the following is configured in local.conf (or the distro):
21# PACKAGE_EXTRA_ARCHS:append = " container-dummy-provides"
22#
23# it has been explicitly # indicated that we don't want or need a shell, so we'll
24# add the dummy provides.
25#
26# This is required, since there are postinstall scripts in base-files and base-passwd
27# that reference /bin/sh and we'll get a rootfs error if there's no shell or no dummy
28# provider.
29CONTAINER_SHELL ?= "${@bb.utils.contains('PACKAGE_EXTRA_ARCHS', 'container-dummy-provides', 'container-dummy-provides', 'busybox', d)}"
30
31# Allow build with or without a specific kernel
32IMAGE_CONTAINER_NO_DUMMY = "1"
33
34# Workaround /var/volatile for now
35ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; "
36rootfs_fixup_var_volatile () {
37 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp
38 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log
39}
40
41OCI_IMAGE_ENTRYPOINT = "curl"
42OCI_IMAGE_TAG = "easy"
43OCI_IMAGE_ENTRYPOINT_ARGS = "http://localhost:80"
44CONTAINER_SHELL = "busybox"
45
46IMAGE_INSTALL:append = "curl"