bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
305 stars 159 forks source link

fix: Support loading tarballs with older podman #712

Open nholstein opened 1 month ago

nholstein commented 1 month ago

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

thesayyn commented 1 month ago

This is a breaking change unfortunately. It changes invocation of the underlying binary from docker load -i to docker load | input

nholstein commented 1 month ago

@thesayyn, thanks for looking into this and you feedback. I wasn't aware that this was a breaking change under Docker; my understanding was that docker supports the same tar $FILES | docker load semantics.

Can you suggest an alternate approach I could investigate that would be compatible?

thesayyn commented 1 month ago

It's a breaking change for rules_oci to change how we invoke the loader cli, it could podman or docker or some shell script user wrote. If we change it from -i to stdin, it's a breaking change.