Skip to content

Commit ff4c4d1

Browse files
committed
fix: Support loading tarballs with older podman
Older versions of Podman appear to handle loading a tarball differently depending upon with the input is /dev/stdin or not. In particular: podman load --input <(cat foo.tar) raises an error, while: cat foo.tar | podman load works without error. (Podman loads from stdin if no --input is specified.) This enables support for podman v3.4.4 included in Ubuntu 22.04. fixes bazel-contrib#711
1 parent a002daf commit ff4c4d1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

oci/private/load.sh.tpl

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ mtree_contents="$(cat $MTREE)"
2828
mtree_contents="${mtree_contents//"$image_root"/}"
2929
mtree_contents="${mtree_contents//"$manifest_root"/}"
3030

31-
"$CONTAINER_CLI" load --input <(
32-
"$TAR" --cd "$RUNFILES_DIR/{{workspace_name}}" --create --no-xattr --no-mac-metadata @- <<< "$mtree_contents"
33-
)
31+
"$TAR" --cd "$RUNFILES_DIR/{{workspace_name}}" --create --no-xattr --no-mac-metadata @- <<< "$mtree_contents" | \
32+
"$CONTAINER_CLI" load

0 commit comments

Comments
 (0)