From b7ea05eb63d53101542cc68dbb929f89b2b850d6 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 18 Mar 2024 13:45:51 -0700 Subject: [PATCH] chore: more robust way to get name of binary target Note this requires upgrading Bazel by one minor release to get native.package_relative_label --- tools/container.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/container.bzl b/tools/container.bzl index aeae4fbc..4f63fac7 100644 --- a/tools/container.bzl +++ b/tools/container.bzl @@ -23,7 +23,7 @@ def multiarch_go_image(name, binary): oci_image( name = image_target, base = "@distroless_static", - entrypoint = ["/app/{}".format(binary.removeprefix(":"))], + entrypoint = ["/app/{}".format(native.package_relative_label(binary).name)], tars = [tar_target], )