bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
280 stars 146 forks source link

FR: implement flatten_tars macro #23

Closed thesayyn closed 1 year ago

thesayyn commented 2 years ago

Needed to flatten multiple layers into one;

Features

thesayyn commented 1 year ago

this turned out to be super simple with pkg_tar.

pkg_tar(
  name = "flatten",
  deps = ["layer1.tar", "layer2.tar"]
)
thesayyn commented 1 year ago

closing as theres an obvious alternative.

Place1 commented 9 months ago

I've run into this question as well but found I needed to use deps instead of srcs like this:

load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

pkg_tar(
  name = "flatten",
  deps = ["layer1.tar", "layer2.tar"]
)