From 8245b80cc9909094d971d5e68d49dea4536bbc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ming=20Lyu=20=E5=90=95=E9=93=AD?= Date: Fri, 15 Sep 2023 15:54:45 +0800 Subject: [PATCH 1/3] Use env variable for docker image entry point config --- BUILD.bazel | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 11096813a..de50e3c45 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -135,16 +135,16 @@ container_image( name = "bazel-remote-image", architecture = "amd64", base = ":bazel-remote-base", - entrypoint = [ - "/app/bazel-remote-base.binary", - "--http_address=:8080", - "--dir=/data", + env = { + "BAZEL_REMOTE_DIR": "/data", + "BAZEL_REMOTE_HTTP_ADDRESS": ":8080", # Listen on all addresses, not just 127.0.0.1, so this can # be reached from outside the container (with a -p mapping). # Specify a port to enable the profiling http server. - "--profile_address=:6060", - ], + "BAZEL_REMOTE_PROFILE_ADDRESS": ":6060", + }, + entrypoint = ["/app/bazel-remote-base.binary"], ports = ["8080"], tars = [ "//docker:data_dir_tar", @@ -157,16 +157,16 @@ container_image( name = "bazel-remote-image-arm64", architecture = "arm64", base = ":bazel-remote-base-arm64", - entrypoint = [ - "/app/bazel-remote-base-arm64.binary", - "--http_address=:8080", - "--dir=/data", + env = { + "BAZEL_REMOTE_DIR": "/data", + "BAZEL_REMOTE_HTTP_ADDRESS": ":8080", # Listen on all addresses, not just 127.0.0.1, so this can # be reached from outside the container (with a -p mapping). # Specify a port to enable the profiling http server. - "--profile_address=:6060", - ], + "BAZEL_REMOTE_PROFILE_ADDRESS": ":6060", + }, + entrypoint = ["/app/bazel-remote-base-arm64.binary"], ports = ["8080"], tars = [ "//docker:data_dir_tar", From e314fab8abe2074c8f2949fe89de4f7c10bcb504 Mon Sep 17 00:00:00 2001 From: CareF Date: Sat, 16 Sep 2023 11:04:56 +0800 Subject: [PATCH 2/3] fix buildifier --- BUILD.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index de50e3c45..db6021171 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -135,6 +135,7 @@ container_image( name = "bazel-remote-image", architecture = "amd64", base = ":bazel-remote-base", + entrypoint = ["/app/bazel-remote-base.binary"], env = { "BAZEL_REMOTE_DIR": "/data", "BAZEL_REMOTE_HTTP_ADDRESS": ":8080", @@ -144,7 +145,6 @@ container_image( # Specify a port to enable the profiling http server. "BAZEL_REMOTE_PROFILE_ADDRESS": ":6060", }, - entrypoint = ["/app/bazel-remote-base.binary"], ports = ["8080"], tars = [ "//docker:data_dir_tar", @@ -157,6 +157,7 @@ container_image( name = "bazel-remote-image-arm64", architecture = "arm64", base = ":bazel-remote-base-arm64", + entrypoint = ["/app/bazel-remote-base-arm64.binary"], env = { "BAZEL_REMOTE_DIR": "/data", "BAZEL_REMOTE_HTTP_ADDRESS": ":8080", @@ -166,7 +167,6 @@ container_image( # Specify a port to enable the profiling http server. "BAZEL_REMOTE_PROFILE_ADDRESS": ":6060", }, - entrypoint = ["/app/bazel-remote-base-arm64.binary"], ports = ["8080"], tars = [ "//docker:data_dir_tar", From d86dcf309412950cc1013343f27f2b35de1e2134 Mon Sep 17 00:00:00 2001 From: Ming Lyu Date: Fri, 1 Mar 2024 21:21:42 +0800 Subject: [PATCH 3/3] Update BUILD.bazel --- BUILD.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index baf263f01..193eab61a 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -122,7 +122,7 @@ oci_image( # Specify a port to enable the profiling http server. "BAZEL_REMOTE_PROFILE_ADDRESS": ":6060", }, - ports = ["8080"], + exposed_ports = ["8080"], tars = [ "data.tar", ":bazel-remote_tar", @@ -148,7 +148,7 @@ oci_image( # Specify a port to enable the profiling http server. "BAZEL_REMOTE_PROFILE_ADDRESS": ":6060", }, - ports = ["8080"], + exposed_ports = ["8080"], tars = [ "data.tar", ":bazel-remote-linux-arm64_tar",