-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstackrox-build.Dockerfile
More file actions
87 lines (78 loc) · 2.64 KB
/
stackrox-build.Dockerfile
File metadata and controls
87 lines (78 loc) · 2.64 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Provides the tooling required to run StackRox dockerized build targets.
FROM registry.access.redhat.com/ubi10:latest
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN touch /i-am-rox-ci-image
RUN dnf update -y && \
dnf install -y \
dnf-plugins-core \
wget \
&& \
dnf config-manager --set-enabled ubi-10-codeready-builder-rpms && \
dnf update -y && \
wget --quiet -O - https://rpm.nodesource.com/setup_lts.x | bash - && \
wget --quiet -O - https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
dnf update -y && \
# This set replaces centos:stream8 "Development Tools". It is possible
# rox-ci-image does not need all of these.
dnf install -y \
autoconf \
automake \
binutils \
gcc \
gcc-c++ \
gdb \
glibc-devel \
libtool \
make \
pkgconf \
pkgconf-m4 \
pkgconf-pkg-config \
redhat-rpm-config \
rpm-build \
strace \
ctags \
git \
perl-Fedora-VSP \
perl-generators \
source-highlight && \
dnf install -y \
bzip2-devel \
gettext \
git-core \
jq \
zstd \
lz4-devel \
nodejs \
procps-ng \
yarn \
zlib-devel \
&& \
dnf upgrade -y && \
dnf clean all && \
rm -rf /var/cache/dnf /var/cache/yum
ARG GOLANG_VERSION=1.24.4
ARG GOLANG_SHA256=77e5da33bb72aeaef1ba4418b6fe511bc4d041873cbf82e5aa6318740df98717
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN url="https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
wget --no-verbose -O go.tgz "$url" && \
echo "${GOLANG_SHA256} *go.tgz" | sha256sum -c - && \
tar -C /usr/local -xzf go.tgz && \
rm go.tgz && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
chmod -R 777 "$GOPATH"
ARG FETCH_VERSION=0.3.5
ARG FETCH_SHA256=8d4d99e903b30dbd24290e9a056a982ea2326a05ded24c63be64df16e7e0d9f0
RUN wget --no-verbose -O fetch https://github.com/gruntwork-io/fetch/releases/download/v${FETCH_VERSION}/fetch_linux_amd64 && \
echo "${FETCH_SHA256} fetch" | sha256sum -c - && \
install fetch /usr/bin && \
rm fetch
ARG OSSLS_VERSION=0.11.1
ARG OSSLS_SHA256=f1bf3012961c1d90ba307a46263f29025028d35c209b9a65e5c7d502c470c95f
RUN fetch --repo="https://github.com/stackrox/ossls" --tag="${OSSLS_VERSION}" --release-asset="ossls_linux_amd64" . && \
echo "${OSSLS_SHA256} *ossls_linux_amd64" | sha256sum -c - && \
install ossls_linux_amd64 /usr/bin/ossls && \
rm ossls_linux_amd64 && \
ossls version
ENV CGO_ENABLED=1
WORKDIR /go/src/github.com/stackrox/rox