Skip to content

Commit

Permalink
Merge pull request #28 from buildbarn/cgo-image
Browse files Browse the repository at this point in the history
add _cgo back
  • Loading branch information
trey-ivy authored Oct 11, 2024
2 parents 90d60fa + 6b688e8 commit 10747de
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions patches/com_buildbarn_bb_storage/base_image.diff
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ index 7f3bade..1323c32 100644
+)
+use_repo(oci, "distroless_base")
diff --git tools/container.bzl tools/container.bzl
index e4aa679..6e92429 100644
index e4aa679..4900487 100644
--- tools/container.bzl
+++ tools/container.bzl
@@ -22,7 +22,7 @@ def multiarch_go_image(name, binary):
Expand All @@ -29,4 +29,21 @@ index e4aa679..6e92429 100644
+ 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
# 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",
)

0 comments on commit 10747de

Please sign in to comment.