-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (40 loc) · 1.81 KB
/
Dockerfile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM alpine:latest
RUN mkdir -p /structured_sbom_outputs
RUN ( \
apk add --no-cache --update \
git bash curl openssl-dev readline-dev zlib-dev autoconf bison build-base yaml-dev ncurses-dev libffi-dev gdbm-dev jq ruby \
ruby-dev make musl-dev go npm py3-pip php php-mbstring php-dom composer \
)
# Install cyclonedx-ruby-gem
RUN ( \
git clone https://github.com/CycloneDX/cyclonedx-ruby-gem.git /opt/cyclonedx-ruby-gem && \
cd /opt/cyclonedx-ruby-gem && gem build cyclonedx-ruby.gemspec && \
gem install cyclonedx-ruby-1.1.0.gem && gem install activesupport bundler \
)
# Install cyclonedx-gomod
ENV GOROOT /usr/lib/go
ENV GOPATH /go
ENV PATH /go/bin:$PATH
RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin
RUN go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
# Install cyclonedx-node
RUN npm install -y @cyclonedx/cyclonedx-npm -g
# Install cyclonedx-python
RUN pip install cyclonedx-bom
# Install cyclonedx-php-composer
RUN composer global config --no-plugins allow-plugins.cyclonedx/cyclonedx-php-composer true
RUN composer global require cyclonedx/cyclonedx-php-composer
# Install cyclonedx-conan
RUN ( \
pip install git+https://github.com/CycloneDX/cyclonedx-conan@main && \
conan config set general.revisions_enabled=1 && \
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan \
)
# Install cyclonedx-cli
RUN curl -fSL -o cyclonedx-cli "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.24.2/cyclonedx-linux-musl-x64" \
&& mv cyclonedx-cli /usr/local/bin/cyclonedx-cli \
&& chmod +x /usr/local/bin/cyclonedx-cli
# Install syft
RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
COPY generate-sbom.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/generate-sbom.sh"]