From: Vasileios Anagnostopoulos <vasileios.anagnostopoulos@siemens.com>
To: <meta-virtualization@lists.yoctoproject.org>
Cc: Pascal Bach <pascal.bach@siemens.com>
Subject: [meta-virtualization][PATCH 1/3] image-oci-umoci: properly handle tags other than latest
Date: Tue, 12 Jul 2022 14:26:45 +0200 [thread overview]
Message-ID: <20220712122647.12746-1-vasileios.anagnostopoulos@siemens.com> (raw)
From: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
---
classes/image-oci-umoci.inc | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc
index 4fe96ea..b159614 100644
--- a/classes/image-oci-umoci.inc
+++ b/classes/image-oci-umoci.inc
@@ -58,48 +58,48 @@ IMAGE_CMD:oci() {
bbdebug 1 "OCI: configuring image"
if [ -n "${OCI_IMAGE_LABELS}" ]; then
for l in ${OCI_IMAGE_LABELS}; do
- bbdebug 1 "OCI: umoci config --image $image_name --config.label $l"
- umoci config --image $image_name --config.label $l
+ bbdebug 1 "OCI: umoci config --image $image_name:${OCI_IMAGE_TAG} --config.label $l"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.label $l
done
fi
if [ -n "${OCI_IMAGE_ENV_VARS}" ]; then
for l in ${OCI_IMAGE_ENV_VARS}; do
- bbdebug 1 "umoci config --image $image_name --config.env $l"
- umoci config --image $image_name --config.env $l
+ bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --config.env $l"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.env $l
done
fi
if [ -n "${OCI_IMAGE_PORTS}" ]; then
for l in ${OCI_IMAGE_PORTS}; do
- bbdebug 1 "umoci config --image $image_name --config.exposedports $l"
- umoci config --image $image_name --config.exposedports $l
+ bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --config.exposedports $l"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.exposedports $l
done
fi
if [ -n "${OCI_IMAGE_RUNTIME_UID}" ]; then
- bbdebug 1 "umoci config --image $image_name --config.user ${OCI_IMAGE_RUNTIME_UID}"
- umoci config --image $image_name --config.user ${OCI_IMAGE_RUNTIME_UID}
+ bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --config.user ${OCI_IMAGE_RUNTIME_UID}"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.user ${OCI_IMAGE_RUNTIME_UID}
fi
if [ -n "${OCI_IMAGE_WORKINGDIR}" ]; then
- bbdebug 1 "umoci config --image $image_name --config.workingdir ${OCI_IMAGE_WORKINGDIR}"
- umoci config --image $image_name --config.workingdir ${OCI_IMAGE_WORKINGDIR}
+ bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --config.workingdir ${OCI_IMAGE_WORKINGDIR}"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.workingdir ${OCI_IMAGE_WORKINGDIR}
fi
if [ -n "${OCI_IMAGE_OS}" ]; then
- bbdebug 1 "umoci config --image $image_name --os ${OCI_IMAGE_OS}"
- umoci config --image $image_name --os ${OCI_IMAGE_OS}
+ bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --os ${OCI_IMAGE_OS}"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --os ${OCI_IMAGE_OS}
fi
- bbdebug 1 "umoci config --image $image_name --architecture ${OCI_IMAGE_ARCH}"
- umoci config --image $image_name --architecture ${OCI_IMAGE_ARCH}
+ bbdebug 1 "umoci config --image $image_name:${OCI_IMAGE_TAG} --architecture ${OCI_IMAGE_ARCH}"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --architecture ${OCI_IMAGE_ARCH}
# NOTE: umoci doesn't currently expose setting the architecture variant,
# so if you need it use sloci instead
if [ -n "${OCI_IMAGE_SUBARCH}" ]; then
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 --config.entrypoint ${OCI_IMAGE_ENTRYPOINT}
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.entrypoint ${OCI_IMAGE_ENTRYPOINT}
if [ -n "${OCI_IMAGE_ENTRYPOINT_ARGS}" ]; then
- umoci config --image $image_name --config.cmd "${OCI_IMAGE_ENTRYPOINT_ARGS}"
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --config.cmd "${OCI_IMAGE_ENTRYPOINT_ARGS}"
fi
- umoci config --image $image_name --author ${OCI_IMAGE_AUTHOR_EMAIL}
+ umoci config --image $image_name:${OCI_IMAGE_TAG} --author ${OCI_IMAGE_AUTHOR_EMAIL}
# make a tar version of the image direcotry
if [ -n "${OCI_IMAGE_TAR_OUTPUT}" ]; then
--
2.34.1
next reply other threads:[~2022-07-12 12:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 12:26 Vasileios Anagnostopoulos [this message]
2022-07-12 12:26 ` [meta-virtualization][PATCH 2/3] image-oci-umoci: add parameter for stop signal Vasileios Anagnostopoulos
2022-07-12 12:26 ` [meta-virtualization][PATCH 3/3] image-oci-umoci: skip parent directory in tar Vasileios Anagnostopoulos
2022-07-12 21:16 ` Bruce Ashfield
2022-07-13 7:19 ` [PATCH " Vasileios Anagnostopoulos
2022-07-13 20:36 ` [meta-virtualization] " Bruce Ashfield
2022-07-14 6:49 ` Anagnostopoulos, Vasileios
[not found] ` <17019F65456D67C8.559@lists.yoctoproject.org>
2022-07-18 11:51 ` Anagnostopoulos, Vasileios
2022-07-18 12:43 ` Bruce Ashfield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220712122647.12746-1-vasileios.anagnostopoulos@siemens.com \
--to=vasileios.anagnostopoulos@siemens.com \
--cc=meta-virtualization@lists.yoctoproject.org \
--cc=pascal.bach@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).