-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (42 loc) · 1.48 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
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
LABEL maintainer="Dan Clark <[email protected]>"
ARG NB_USER="myguy"
ARG NB_UID="1000"
ARG NB_GID="100"
# Configure environment
ENV SHELL=/bin/bash \
NB_USER=$NB_USER \
NB_UID=$NB_UID \
NB_GID=$NB_GID \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
ENV PATH=$PATH:/usr/local/bin \
HOME=/home/$NB_USER
USER root
# Add binaries used by the cve tools
ADD https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/oc-mirror.tar.gz /usr/local/bin/oc-mirror.tar.gz
ADD https://mirror.openshift.com/pub/rhacs/assets/latest/bin/linux/roxctl /usr/local/bin/roxctl
# Install all OS dependencies for notebook server that starts but lacks all
# features (e.g., download as all possible file formats)
RUN microdnf --setopt tsflags=nodocs -y update && \
microdnf --setopt tsflags=nodocs -y install \
make git tar golang-bin curl jq && \
microdnf clean all && \
rm -rf /var/cache/dnf && \
useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
pushd /usr/local/bin && \
tar -xzf oc-mirror.tar.gz && \
rm -f README.md && \
rm -f oc-mirror.tar.gz && \
chmod 0755 oc-mirror roxctl && \
popd
USER $NB_UID
WORKDIR $HOME
RUN git clone https://github.com/dmc5179/cve-analyser.git && \
git clone https://github.com/dmc5179/operator-cve-scanner.git && \
pushd cve-analyser && \
make clean && \
make && \
popd
# Configure container startup
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"