Skip to content

Commit

Permalink
feat(docker): Add Bazel to runtime image and env path
Browse files Browse the repository at this point in the history
Signed-off-by: Haiko Schol <[email protected]>
  • Loading branch information
haikoschol committed Mar 14, 2024
1 parent ed029a9 commit 585bff2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 585bff2

Please sign in to comment.