Skip to content

Commit

Permalink
Merge pull request #27 from buildbarn/baseimage
Browse files Browse the repository at this point in the history
patch storage to use distroless base image
  • Loading branch information
trey-ivy authored Oct 11, 2024
2 parents 9a34ad5 + 02eed92 commit 90d60fa
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 15 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ git_override(
module_name = "com_github_buildbarn_bb_storage",
commit = "0941111f29e31905e4081e6262bccf0c123940ed",
patches = [
"//:patches/com_buildbarn_bb_storage/containers.diff",
"//:patches/com_buildbarn_bb_storage/base_image.diff",
"//:patches/com_buildbarn_bb_storage/workflows_template.diff",
],
remote = "https://github.com/buildbarn/bb-storage.git",
Expand Down
45 changes: 44 additions & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions patches/com_buildbarn_bb_storage/base_image.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git MODULE.bazel MODULE.bazel
index 7f3bade..1323c32 100644
--- MODULE.bazel
+++ MODULE.bazel
@@ -137,3 +137,14 @@ oci.pull(
],
)
use_repo(oci, "distroless_static")
+
+oci.pull(
+ name = "distroless_base",
+ digest = "sha256:6ae5fe659f28c6afe9cc2903aebc78a5c6ad3aaa3d9d0369760ac6aaea2529c8",
+ image = "gcr.io/distroless/base",
+ platforms = [
+ "linux/amd64",
+ "linux/arm64/v8",
+ ],
+)
+use_repo(oci, "distroless_base")
diff --git tools/container.bzl tools/container.bzl
index e4aa679..6e92429 100644
--- tools/container.bzl
+++ tools/container.bzl
@@ -22,7 +22,7 @@ def multiarch_go_image(name, binary):

oci_image(
name = image_target,
- base = Label("@distroless_static"),
+ base = Label("@distroless_base"),
entrypoint = ["/app/{}".format(native.package_relative_label(binary).name)],
tars = [tar_target],
# Don't build un-transitioned images, as the default target architecture might be unsupported
13 changes: 0 additions & 13 deletions patches/com_buildbarn_bb_storage/containers.diff

This file was deleted.

0 comments on commit 90d60fa

Please sign in to comment.