-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (62 loc) · 2.42 KB
/
Dockerfile
File metadata and controls
70 lines (62 loc) · 2.42 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
FROM quay.io/fedora/python-313:20260319@sha256:95100620c772c9f4484923bb8d4e942c8da2a60ee32a84a905d612d7115b1a44
ARG GITHUB_SHA
LABEL \
name="ResultsDB_frontend application" \
description="ResultsDB_frontend is a simple application that allows browsing the data stored inside ResultsDB." \
maintainer="Red Hat, Inc." \
license="GPLv2+" \
url="https://github.com/release-engineering/resultsdb_frontend" \
vcs-type="git" \
vcs-ref=$GITHUB_SHA \
io.k8s.display-name="ResultsDB_frontend"
USER root
ARG DEFAULT_LOG_LEVEL=info
ENV \
PIP_DEFAULT_TIMEOUT=100 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
PYTHONFAULTHANDLER=1 \
PYTHONHASHSEED=random \
PYTHONUNBUFFERED=1 \
LOG_LEVEL=$DEFAULT_LOG_LEVEL \
RESULTSDB_FRONTEND_CONFIG=/etc/resultsdb_frontend/settings.py
COPY . /opt/app-root/src/resultsdb_frontend/
RUN dnf -y install \
--setopt install_weak_deps=false \
--nodocs \
--disablerepo=* \
--enablerepo=fedora,updates \
httpd \
mod_ssl \
python3-mod_wsgi \
rpm-build \
&& pip3 install --upgrade --upgrade-strategy eager \
-r /opt/app-root/src/resultsdb_frontend/requirements.txt \
&& pip3 install --no-deps /opt/app-root/src/resultsdb_frontend \
&& dnf -y remove python3-pip \
&& dnf -y clean all \
&& install -d /usr/share/resultsdb_frontend/conf \
&& install -p -m 0644 \
/opt/app-root/src/resultsdb_frontend/conf/resultsdb_frontend.conf \
/usr/share/resultsdb_frontend/conf/ \
&& install -p -m 0644 \
/opt/app-root/src/resultsdb_frontend/conf/resultsdb_frontend.wsgi \
/usr/share/resultsdb_frontend/ \
&& install -d /etc/resultsdb_frontend \
&& install -p -m 0644 \
/opt/app-root/src/resultsdb_frontend/conf/resultsdb_frontend.conf \
/etc/httpd/conf.d/ \
# fix apache config for container use
&& sed -i 's#^WSGISocketPrefix .*#WSGISocketPrefix /tmp/wsgi#' \
/opt/app-root/src/resultsdb_frontend/conf/resultsdb_frontend.conf
EXPOSE 5002
CMD ["mod_wsgi-express-3", "start-server", "/usr/share/resultsdb_frontend/resultsdb_frontend.wsgi", \
"--user", "apache", "--group", "apache", \
"--port", "5002", "--threads", "5", \
"--include-file", "/etc/httpd/conf.d/resultsdb_frontend.conf", \
"--log-level", "${LOG_LEVEL}", \
"--log-to-terminal", \
"--access-log", \
"--startup-log" \
]
USER 1001:0