File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed
Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -65,23 +65,12 @@ RUN apt-get update && \
6565 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $DEPS && \
6666 rm -rf /var/lib/apt/lists/*
6767
68- # Set working directory for Bazel build
69- WORKDIR /root/bazel
68+ # Install bazelisk and set Bazel version
69+ ARG BAZELISK_VERSION=v1.27.0
70+ RUN curl -L -o /usr/local/bin/bazelisk "https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-$(uname -m)" \
71+ && chmod +x /usr/local/bin/bazelisk \
72+ && ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel
7073
7174
72- # Download Bazel source and remove zip immediately after extraction
73- ARG BAZEL_VERSION=7.7.1
74- RUN curl -LO https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip && \
75- unzip -q bazel-${BAZEL_VERSION}-dist.zip && \
76- rm -f bazel-${BAZEL_VERSION}-dist.zip
77-
78- ## Build Bazel and copy the binary
79- # NOTE: This step is flaky and may hang for multiarch/buildx.
80- # If it takes more than 2 hours, restart the Docker build.
81- ENV EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk"
82- RUN ./compile.sh && \
83- mv /output/bazel /usr/bin/bazel && \
84- rm -rf /root/bazel
85-
86- # Ensure a valid working directory after build
75+ # Set a valid working directory
8776WORKDIR /root
You can’t perform that action at this time.
0 commit comments