Skip to content

Commit

Permalink
build ort from source in dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: MarkAckert <[email protected]>
  • Loading branch information
MarkAckert committed Feb 2, 2024
1 parent e7fafc8 commit b9dca39
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .dockerfiles/ort.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ FROM debian:bullseye
#####################################################
# version the Dockerfile, so we can do release bump
LABEL version="1.0.0"
ARG ORT_VERSION=12.0.0

USER root

Expand Down Expand Up @@ -50,9 +49,18 @@ RUN rustup install stable && rustup default stable
RUN cargo install cargo-license
RUN cargo install get-license-helper

RUN wget -O ort.zip "https://github.com/oss-review-toolkit/ort/releases/download/$ORT_VERSION/ort-$ORT_VERSION.zip"
RUN unzip ort.zip
ENV PATH=/home/build/ort-$ORT_VERSION/bin:$PATH
ARG ORT_VERSION=15.1.0

RUN git clone https://github.com/oss-review-toolkit/ort
WORKDIR /home/build/ort
RUN git checkout "$ORT_VERSION"
RUN git submodule update --init --recursive
RUN ./gradlew installDist

## ORT Binary install - requires Java 17+, which causes issues with some of our v2 projects (Java 11)
# RUN wget -O ort.zip "https://github.com/oss-review-toolkit/ort/releases/download/$ORT_VERSION/ort-$ORT_VERSION.zip"
# RUN unzip ort.zip
ENV PATH=/home/build/ort/cli/build/install/ort/bin:$PATH

WORKDIR /home/build

Expand Down

0 comments on commit b9dca39

Please sign in to comment.