forked from RedHatProductSecurity/osidb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.Dockerfile
executable file
·45 lines (39 loc) · 1.44 KB
/
test.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
FROM quay.io/fedora/fedora:34
LABEL summary="OSIDB testrunner" \
maintainer="Product Security DevOps <[email protected]>"
ARG PYPI_MIRROR="https://pypi.python.org/simple"
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=off \
PIP_INDEX_URL=$PYPI_MIRROR \
REQUESTS_CA_BUNDLE="/etc/pki/tls/certs/ca-bundle.crt"
WORKDIR /opt/app-root/src/
# Download internal root CA cert and the IPA CA cert
ARG RH_CERT_URL=""
COPY ./scripts /opt/app-root/src/scripts
RUN ./scripts/install-certs.sh $RH_CERT_URL
# install dependencies and security updates
RUN dnf --nodocs --setopt install_weak_deps=false -y install \
cargo \
gcc \
git \
krb5-devel \
krb5-workstation \
libffi-devel \
libpq-devel \
make \
openldap-devel \
openssl-devel \
pip \
python3-devel \
python3-tox \
redhat-rpm-config \
which \
&& dnf --nodocs --setopt install_weak_deps=false -y upgrade --security \
&& dnf clean all
# Before copying the entire source, copy just devel-requirements.txt.
# This makes podman cache this (lengthy) step as long as devel-requirements.txt stays unchanged.
# Without this, any change in src/ would make pip install run again.
COPY ./devel-requirements.txt /opt/app-root/src/devel-requirements.txt
RUN pip3 install -r /opt/app-root/src/devel-requirements.txt && \
rm -f /opt/app-root/src/devel-requirements.txt
COPY . /opt/app-root/src