| 1 |
#======================== |
| 2 |
# Bazel installation |
| 3 |
|
| 4 |
# Must be in sync with tools/bazel |
| 5 |
ENV BAZEL_VERSION 5.3.0 |
| 6 |
|
| 7 |
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. |
| 8 |
ENV DISABLE_BAZEL_WRAPPER 1 |
| 9 |
|
| 10 |
# Download the correct bazel version and make sure it's on path. |
| 11 |
RUN BAZEL_ARCH_SUFFIX="$(uname -m | sed s/aarch64/arm64/)" ${'\\'} |
| 12 |
&& curl -sSL --fail -o /usr/local/bin/bazel "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-$BAZEL_ARCH_SUFFIX" ${'\\'} |
| 13 |
&& chmod a+x /usr/local/bin/bazel |
| 14 |
|
| 15 |
# Normally we would run "bazel --version" here to make sure bazel |
| 16 |
# was correctly installed, but we can't do that because |
| 17 |
# of # https://github.com/bazelbuild/bazel/issues/11379. |
| 18 |
# We want to keep the arm64 version of the image buildable |
| 19 |
# on x64 with use of qemu-user-static & binfmt emulation, |
| 20 |
# but the self-extraction is broken for bazel currently. |
| 21 |
# The binary will work correctly when run on real arm64 |
| 22 |
# hardware, when qemu-user-static isn't getting into the way. |