-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-scraper
45 lines (38 loc) · 1.25 KB
/
Dockerfile-scraper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ubuntu:jammy
RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends \
curl \
default-jdk \
jq \
libdigest-sha-perl \
openssl \
python3-pip \
&& apt-get autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install yq
ENV CDX_VERSION 0.24.2
ENV SYFT_VERSION 0.62.1
RUN curl -fsSOL https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${CDX_VERSION}/cyclonedx-linux-x64 \
&& mv cyclonedx-linux-x64 /usr/local/bin/cdx \
&& chmod +x /usr/local/bin/cdx \
&& curl -fsSOL https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.tar.gz \
&& tar xvzf syft_${SYFT_VERSION}_linux_amd64.tar.gz syft \
&& mv syft /usr/local/bin \
&& chmod +x /usr/local/bin/syft \
&& rm syft_${SYFT_VERSION}_linux_amd64.tar.gz
RUN which cdx \
&& which curl \
&& which jar \
&& which jdeps \
&& which jq \
&& which openssl \
&& which python3 \
&& which shasum \
&& which syft \
&& which xq
COPY scripts/sbom_scraper.sh /usr/local/bin/sbom_scraper.sh
RUN chmod +x /usr/local/bin/sbom_scraper.sh
ENTRYPOINT ["/usr/local/bin/sbom_scraper.sh"]