diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-10-16 18:13:17 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-11-06 16:21:12 +0000 |
commit | 2474e287c9c658c5ea9bb1b1c52fa37f60522221 (patch) | |
tree | 7d885af0825295a47249a8f3d37587811914a419 /classes | |
parent | 58a5300e7a808dd077064de2525e75aa27f8596f (diff) | |
download | meta-virtualization-2474e287c9c658c5ea9bb1b1c52fa37f60522221.tar.gz |
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image-oci-umoci.inc | 5 |
1 files changed, 3 insertions, 2 deletions
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() { | |||
99 | bbnote "OCI: image subarch is set to: ${OCI_IMAGE_SUBARCH}, but umoci does not" | 99 | bbnote "OCI: image subarch is set to: ${OCI_IMAGE_SUBARCH}, but umoci does not" |
100 | bbnote " expose variants. use sloci instead if this is important" | 100 | bbnote " expose variants. use sloci instead if this is important" |
101 | fi | 101 | fi |
102 | umoci config --image $image_name:${OCI_IMAGE_TAG} --config.entrypoint ${OCI_IMAGE_ENTRYPOINT} | 102 | umoci config --image $image_name:${OCI_IMAGE_TAG} \ |
103 | ${@" ".join("--config.entrypoint %s" % s for s in d.getVar("OCI_IMAGE_ENTRYPOINT").split())} | ||
103 | if [ -n "${OCI_IMAGE_ENTRYPOINT_ARGS}" ]; then | 104 | if [ -n "${OCI_IMAGE_ENTRYPOINT_ARGS}" ]; then |
104 | umoci config --image $image_name:${OCI_IMAGE_TAG} --config.cmd "${OCI_IMAGE_ENTRYPOINT_ARGS}" | 105 | umoci config --image $image_name:${OCI_IMAGE_TAG} ${@" ".join("--config.cmd %s" % s for s in d.getVar("OCI_IMAGE_ENTRYPOINT_ARGS").split())} |
105 | fi | 106 | fi |
106 | umoci config --image $image_name:${OCI_IMAGE_TAG} --author ${OCI_IMAGE_AUTHOR_EMAIL} | 107 | umoci config --image $image_name:${OCI_IMAGE_TAG} --author ${OCI_IMAGE_AUTHOR_EMAIL} |
107 | 108 | ||