Skip to content

Commit 02eed92

Browse files
author
Trey Ivy
committed
patch storage to use distroless base image
1 parent 9a34ad5 commit 02eed92

File tree

4 files changed

+77
-15
lines changed

4 files changed

+77
-15
lines changed

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ git_override(
2020
module_name = "com_github_buildbarn_bb_storage",
2121
commit = "0941111f29e31905e4081e6262bccf0c123940ed",
2222
patches = [
23-
"//:patches/com_buildbarn_bb_storage/containers.diff",
23+
"//:patches/com_buildbarn_bb_storage/base_image.diff",
2424
"//:patches/com_buildbarn_bb_storage/workflows_template.diff",
2525
],
2626
remote = "https://github.com/buildbarn/bb-storage.git",

MODULE.bazel.lock

+44-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff --git MODULE.bazel MODULE.bazel
2+
index 7f3bade..1323c32 100644
3+
--- MODULE.bazel
4+
+++ MODULE.bazel
5+
@@ -137,3 +137,14 @@ oci.pull(
6+
],
7+
)
8+
use_repo(oci, "distroless_static")
9+
+
10+
+oci.pull(
11+
+ name = "distroless_base",
12+
+ digest = "sha256:6ae5fe659f28c6afe9cc2903aebc78a5c6ad3aaa3d9d0369760ac6aaea2529c8",
13+
+ image = "gcr.io/distroless/base",
14+
+ platforms = [
15+
+ "linux/amd64",
16+
+ "linux/arm64/v8",
17+
+ ],
18+
+)
19+
+use_repo(oci, "distroless_base")
20+
diff --git tools/container.bzl tools/container.bzl
21+
index e4aa679..6e92429 100644
22+
--- tools/container.bzl
23+
+++ tools/container.bzl
24+
@@ -22,7 +22,7 @@ def multiarch_go_image(name, binary):
25+
26+
oci_image(
27+
name = image_target,
28+
- base = Label("@distroless_static"),
29+
+ base = Label("@distroless_base"),
30+
entrypoint = ["/app/{}".format(native.package_relative_label(binary).name)],
31+
tars = [tar_target],
32+
# Don't build un-transitioned images, as the default target architecture might be unsupported

patches/com_buildbarn_bb_storage/containers.diff

-13
This file was deleted.

0 commit comments

Comments
 (0)