From 2474e287c9c658c5ea9bb1b1c52fa37f60522221 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 16 Oct 2023 18:13:17 +0000 Subject: umoci: allow encoding of multiple entrypoint or cmd arguments umoci can encode both entrypoint and cmd lists into the oci image. This is done by using the --config.entrypoint and --config.cmd arguments multiple times. We can split our OCI_* variables on space and support multiple arguments in either command and keep compatibility with existing users. Signed-off-by: Bruce Ashfield --- classes/image-oci-umoci.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc index 58e46681..0d6c712d 100644 --- a/classes/image-oci-umoci.inc +++ b/classes/image-oci-umoci.inc @@ -99,9 +99,10 @@ IMAGE_CMD:oci() { bbnote "OCI: image subarch is set to: ${OCI_IMAGE_SUBARCH}, but umoci does not" bbnote " expose variants. use sloci instead if this is important" fi - umoci config --image $image_name:${OCI_IMAGE_TAG} --config.entrypoint ${OCI_IMAGE_ENTRYPOINT} + umoci config --image $image_name:${OCI_IMAGE_TAG} \ + ${@" ".join("--config.entrypoint %s" % s for s in d.getVar("OCI_IMAGE_ENTRYPOINT").split())} if [ -n "${OCI_IMAGE_ENTRYPOINT_ARGS}" ]; then - umoci config --image $image_name:${OCI_IMAGE_TAG} --config.cmd "${OCI_IMAGE_ENTRYPOINT_ARGS}" + umoci config --image $image_name:${OCI_IMAGE_TAG} ${@" ".join("--config.cmd %s" % s for s in d.getVar("OCI_IMAGE_ENTRYPOINT_ARGS").split())} fi umoci config --image $image_name:${OCI_IMAGE_TAG} --author ${OCI_IMAGE_AUTHOR_EMAIL} -- cgit v1.2.3-54-g00ecf