bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
299 stars 157 forks source link

FR: Support loading oci images from tarballs #413

Open froody opened 1 year ago

froody commented 1 year ago

I need an ubuntu image with some packages installed, so I use docker to build that image and export it as an oci image tarball. The problem is there's no clean way to use this with oci_image. My workaround is untaring the image, finding the layers I want, and manually adding them in the tars argument to oci_image but that's hard to automate. It would be much nicer if I could do oci_image(base=":my_oci_image.tar", ...)

alexeagle commented 11 months ago

I think most users do this by publishing their docker image to a registry and then using oci_pull. Would that work for you?

thesayyn commented 6 months ago

FWIW, builkit supports oci tarballs, which are tar'ed oci-layouts (our intermediate format) that can be extracted using BSDTAR toolchain.

mering commented 3 weeks ago

This was possible in 1.x but is no longer possible in 2.x.

See #700 for additional information.