diff --git a/Dockerfile b/Dockerfile index e65310703e364..11691fd5ea0d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -564,3 +564,18 @@ ENV PATH=$PATH:$HASKELL_HOME/bin COPY --from=haskell /opt/haskell /opt/haskell RUN syft /opt/haskell -o spdx-json --file /usr/share/doc/ort/ort-haskell.spdx.json + +# Bazel +ENV BAZEL_HOME=/opt/bazel + +RUN mkdir -p $BAZEL_HOME/bin \ + && if [ "$(arch)" = "aarch64" ]; then \ + curl -L https://github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-linux-arm64 -o $BAZEL_HOME/bin/bazel; \ + else \ + curl -L https://github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-linux-x86_64 -o $BAZEL_HOME/bin/bazel; \ + fi \ + && chmod a+x $BAZEL_HOME/bin/bazel + +ENV PATH=$PATH:$BAZEL_HOME/bin + +RUN syft $BAZEL_HOME -o spdx-json --file /usr/share/doc/ort/ort-bazel.spdx.json