-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
78 lines (64 loc) · 2.16 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM fedora:38
ARG cacert_url=undefined
ARG short_commit=unknown
LABEL \
description="Compose Tracking Service" \
distribution-scope="public" \
io.k8s.description="Compose Tracking Service" \
license="MIT" \
maintainer="CTS developers" \
name="CTS" \
url="https://github.com/release-engineering/cts"
WORKDIR /src
RUN dnf -y --setopt=install_weak_deps=False update \
&& dnf -v -y --setopt=install_weak_deps=False install \
httpd \
mod_auth_gssapi \
mod_auth_openidc \
mod_ldap \
mod_ssl \
python3-defusedxml \
python3-fedora \
python3-flask \
python3-flask-login \
python3-flask-migrate \
python3-flask-sqlalchemy \
python3-ldap \
python3-marshmallow \
python3-mod_wsgi \
python3-openidc-client \
python3-pip \
python3-productmd \
python3-prometheus_client \
python3-psutil \
python3-psycopg2 \
python3-pyOpenSSL \
python3-pyyaml \
python3-sqlalchemy \
python3-opentelemetry-sdk \
python3-opentelemetry-instrumentation-flask \
python3-opentelemetry-instrumentation-sqlalchemy \
python3-opentelemetry-exporter-otlp-proto-http \
# Debugging packages \
net-tools \
iproute \
iputils \
traceroute \
&& dnf -y clean all \
&& rm -f /tmp/*
RUN chmod 755 /var/log/httpd
RUN if [ "$cacert_url" != "undefined" ]; then \
cd /etc/pki/ca-trust/source/anchors \
&& curl -O --insecure $cacert_url \
&& update-ca-trust extract; \
fi
COPY . .
# Update version with build metadata https://semver.org/#spec-item-10
RUN sed -i -E "s/(version=\")([^\"]+)/\1\2+$(date -u +'%Y%m%dT%H%M%S').git.$short_commit/" setup.py
RUN mkdir -p /usr/share/cts && cp contrib/cts.wsgi /usr/share/cts/
# Install dependencies not available in fedora
RUN pip3 install --trusted-host pypi.org -r requirements.txt
RUN pip3 install --trusted-host pypi.org --no-deps -e .
RUN mkdir -p cts/static/ && CTS_DEVELOPER_ENV=1 cts-manager openapispec > cts/static/openapispec.json
EXPOSE 5005
CMD ["./start_cts_from_here"]