Skip to content

Commit

Permalink
fix: Support loading tarballs with older podman
Browse files Browse the repository at this point in the history
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 #711
  • Loading branch information
nholstein committed Oct 9, 2024
1 parent a002daf commit ff4c4d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions oci/private/load.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ mtree_contents="$(cat $MTREE)"
mtree_contents="${mtree_contents//"$image_root"/}"
mtree_contents="${mtree_contents//"$manifest_root"/}"

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

0 comments on commit ff4c4d1

Please sign in to comment.