-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbase_image.diff
49 lines (47 loc) · 1.73 KB
/
base_image.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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..4900487 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
@@ -32,7 +32,7 @@ def multiarch_go_image(name, binary):
for arch in ["amd64", "arm64"]:
arch_image_target = "{}_{}_image".format(name, arch)
- target_platform = "@rules_go//go/toolchain:linux_" + arch
+ target_platform = "@rules_go//go/toolchain:linux_" + arch + "_cgo"
images.append(arch_image_target)
platform_transition_filegroup(
name = arch_image_target,
@@ -49,6 +49,6 @@ def container_push_official(name, image, component):
oci_push(
name = name,
image = image,
- repository = "ghcr.io/buildbarn/" + component,
+ repository = "ghcr.io/buildbarn/" + component + "/backend",
remote_tags = "@com_github_buildbarn_bb_storage//tools:stamped_tags",
)