Skip to content

Commit

Permalink
chore: more robust way to get name of binary target
Browse files Browse the repository at this point in the history
Note this requires upgrading Bazel by one minor release to get native.package_relative_label
  • Loading branch information
alexeagle committed Mar 20, 2024
1 parent bbe5fda commit b7ea05e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/container.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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],
)

Expand Down

0 comments on commit b7ea05e

Please sign in to comment.