From 30647f3d94a4229646aabf74e640b5c564480388 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 29 Oct 2024 15:17:50 +0000 Subject: images: add reference application container Includes container-base. Provides an application container that installs a package (or packages) to the container and make the specified command the OCI_IMAGE_ENTRYPOINT. CONTAINER_APP_CMD : the binary to run via the OCI_IMAGE_ENTRYPOINT CONATINER_APP: packages to install to the container The default entry point is the "date" command. % root@qemuarm64-54:~# docker run zeddii/container-app-base Mon Oct 28 18:41:23 UTC 2024 % root@qemuarm64-54:~# docker run --entrypoint "du" zeddii/container-app-base -sh 2.6M . % podman run docker.io/zeddii/container-app-base Mon Oct 28 18:41:23 UTC 2024 Signed-off-by: Bruce Ashfield --- recipes-extended/images/container-app-base.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 recipes-extended/images/container-app-base.bb diff --git a/recipes-extended/images/container-app-base.bb b/recipes-extended/images/container-app-base.bb new file mode 100644 index 00000000..eabef989 --- /dev/null +++ b/recipes-extended/images/container-app-base.bb @@ -0,0 +1,17 @@ +SUMMARY = "Basic Application container image" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +include container-base.bb + +# CONTAINER_APP_CMD is the executable to run as the entrypoint of the +# container. What we have below is a placholder. if you run this +# container, you'll get the date echo'd +CONTAINER_APP_CMD ?= "date" + +# The container app is the package(s) to install into the container. +# They must provide the command specified in CONTAINER_APP_CMD +CONTAINER_APP ?= "" + +OCI_IMAGE_ENTRYPOINT = "${CONTAINER_APP_CMD}" +IMAGE_INSTALL:append = "${CONTAINER_APP}" -- cgit v1.2.3-54-g00ecf