Skip to content

Commit 58f3e56

Browse files
allisonkarlitskayacgwalters
authored andcommitted
examples: pull directly from containers storage
Instead of having podman save our container images to a oci-archive and pulling from that, save ourselves a bunch of work (including a gzip compress/decompress cycle) by pulling directly from `containers-storage:`. Signed-off-by: Allison Karlitskaya <[email protected]>
1 parent 99efc0c commit 58f3e56

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

examples/bls/build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ podman build \
4949
.
5050

5151
BASE_ID="$(sed s/sha256:// tmp/base.iid)"
52-
podman save --format oci-archive -o tmp/base.tar "${BASE_ID}"
53-
${CFSCTL} oci pull oci-archive:tmp/base.tar
52+
${CFSCTL} oci pull containers-storage:${BASE_ID}
5453
BASE_IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${BASE_ID}")"
5554
fsck.erofs "tmp/sysroot/composefs/images/${BASE_IMAGE_FSVERITY}"
5655

examples/uki/build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ ${PODMAN_BUILD} \
4141
.
4242

4343
BASE_ID="$(sed s/sha256:// tmp/base.iid)"
44-
podman save --format oci-archive -o tmp/base.tar "${BASE_ID}"
45-
${CFSCTL} oci pull oci-archive:tmp/base.tar
44+
${CFSCTL} oci pull containers-storage:"${BASE_ID}"
4645
BASE_IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${BASE_ID}")"
4746

4847
${PODMAN_BUILD} \
@@ -54,8 +53,7 @@ ${PODMAN_BUILD} \
5453
.
5554

5655
FINAL_ID="$(sed s/sha256:// tmp/final.iid)"
57-
podman save --format oci-archive -o tmp/final.tar "${FINAL_ID}"
58-
${CFSCTL} oci pull oci-archive:tmp/final.tar
56+
${CFSCTL} oci pull containers-storage:"${FINAL_ID}"
5957
FINAL_IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${FINAL_ID}")"
6058
fsck.erofs "tmp/sysroot/composefs/images/${FINAL_IMAGE_FSVERITY}"
6159

examples/unified-secureboot/build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ podman build \
4747
.
4848

4949
IMAGE_ID="$(sed s/sha256:// tmp/iid)"
50-
podman save --format oci-archive -o tmp/final.tar "${IMAGE_ID}"
51-
${CFSCTL} oci pull oci-archive:tmp/final.tar
50+
${CFSCTL} oci pull containers-storage:"${IMAGE_ID}"
5251
IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${IMAGE_ID}")"
5352
fsck.erofs "tmp/sysroot/composefs/images/${IMAGE_FSVERITY}"
5453

examples/unified/build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ podman build \
2929
.
3030

3131
IMAGE_ID="$(sed s/sha256:// tmp/iid)"
32-
podman save --format oci-archive -o tmp/final.tar "${IMAGE_ID}"
33-
${CFSCTL} oci pull oci-archive:tmp/final.tar
32+
${CFSCTL} oci pull containers-storage:"${IMAGE_ID}"
3433
IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${IMAGE_ID}")"
3534
fsck.erofs "tmp/sysroot/composefs/images/${IMAGE_FSVERITY}"
3635

0 commit comments

Comments
 (0)