Skip to content

Commit

Permalink
Dockerfile: Install ScanCode from PyPI instead of building from source
Browse files Browse the repository at this point in the history
This is to work around [1].

[1]: aboutcode-org/scancode-toolkit#2869

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Feb 16, 2022
1 parent 4ff6895 commit 9946f7e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,7 @@ RUN /opt/ort/bin/import_proxy_certs.sh && \

# Add scanners (in versions known to work).
ARG SCANCODE_VERSION
RUN curl -ksSL https://github.com/nexB/scancode-toolkit/archive/v$SCANCODE_VERSION.tar.gz | \
tar -zxC /usr/local && \
# Trigger ScanCode configuration for Python 3 and reindex licenses initially.
cd /usr/local/scancode-toolkit-$SCANCODE_VERSION && \
PYTHON_EXE=/usr/bin/python3 /usr/local/scancode-toolkit-$SCANCODE_VERSION/scancode --reindex-licenses && \
chmod -R o=u /usr/local/scancode-toolkit-$SCANCODE_VERSION && \
ln -s /usr/local/scancode-toolkit-$SCANCODE_VERSION/scancode /usr/local/bin/scancode
RUN pip install --no-cache-dir scancode-toolkit==$SCANCODE_VERSION

FROM run

Expand Down

0 comments on commit 9946f7e

Please sign in to comment.