diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image-oci-umoci.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc index 9ece0404..c77750fb 100644 --- a/classes/image-oci-umoci.inc +++ b/classes/image-oci-umoci.inc | |||
@@ -106,6 +106,10 @@ IMAGE_CMD:oci() { | |||
106 | fi | 106 | fi |
107 | 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} |
108 | 108 | ||
109 | # OCI_IMAGE_TAG may contain ":", but these are not allowed in OCI file | ||
110 | # names so replace them | ||
111 | image_tag="${@d.getVar("OCI_IMAGE_TAG").replace(":", "_")}" | ||
112 | |||
109 | # make a tar version of the image direcotry | 113 | # make a tar version of the image direcotry |
110 | # 1) image_name.tar: compatible with oci tar format, blobs and rootfs | 114 | # 1) image_name.tar: compatible with oci tar format, blobs and rootfs |
111 | # are at the top level. Can load directly from something like podman | 115 | # are at the top level. Can load directly from something like podman |
@@ -119,13 +123,13 @@ IMAGE_CMD:oci() { | |||
119 | tar -cf "$image_name-dir.tar" "$image_name" | 123 | tar -cf "$image_name-dir.tar" "$image_name" |
120 | 124 | ||
121 | # create a convenience symlink | 125 | # create a convenience symlink |
122 | ln -sf "$image_name.tar" "${IMAGE_BASENAME}-${OCI_IMAGE_TAG}-oci.tar" | 126 | ln -sf "$image_name.tar" "${IMAGE_BASENAME}-$image_tag-oci.tar" |
123 | ln -sf "$image_name-dir.tar" "${IMAGE_BASENAME}-${OCI_IMAGE_TAG}-oci-dir.tar" | 127 | ln -sf "$image_name-dir.tar" "${IMAGE_BASENAME}-$image_tag-oci-dir.tar" |
124 | fi | 128 | fi |
125 | 129 | ||
126 | # We could make this optional, since the bundle is directly runnable via runc | 130 | # We could make this optional, since the bundle is directly runnable via runc |
127 | rm -rf $image_bundle_name | 131 | rm -rf $image_bundle_name |
128 | 132 | ||
129 | # This is the OCI image directory, which is technically the "image" as specified | 133 | # This is the OCI image directory, which is technically the "image" as specified |
130 | ln -sf $image_name ${IMAGE_BASENAME}-${OCI_IMAGE_TAG}-oci | 134 | ln -sf $image_name ${IMAGE_BASENAME}-$image_tag-oci |
131 | } | 135 | } |