forked from containerbuildsystem/cachito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-api
42 lines (36 loc) · 1.28 KB
/
Dockerfile-api
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
FROM registry.fedoraproject.org/fedora:36
LABEL maintainer="Red Hat"
WORKDIR /src
RUN dnf -y install \
--setopt=deltarpm=0 \
--setopt=install_weak_deps=false \
--setopt=tsflags=nodocs \
httpd \
gcc \
libffi-devel \
libpq-devel \
mod_auth_gssapi \
mod_ssl \
mod_wsgi \
krb5-devel \
python3-pip \
python3-setuptools \
python-devel \
redhat-rpm-config \
&& dnf clean all
COPY . .
COPY ./docker/cachito-httpd.conf /etc/httpd/conf/httpd.conf
RUN pip3 install -r requirements.txt --no-deps --no-cache-dir --require-hashes \
&& pip3 install -r requirements-web.txt --no-deps --no-cache-dir --require-hashes \
&& pip3 install . --no-deps --no-cache-dir
# Use the system CA bundle for the requests library
ENV REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/extracted/pem/directory-hash/ca-bundle.crt
# Use the system CA bundle for native SSL calls from celery (python)
ENV SSL_CERT_FILE=/etc/pki/ca-trust/extracted/pem/directory-hash/ca-bundle.crt
# Disable gitpython check for the git executable, cachito-api doesn't use git
ENV GIT_PYTHON_REFRESH=quiet
# Environment variable used by the Prometheus Flask exporter.
ENV PROMETHEUS_MULTIPROC_DIR=/tmp/prometheus_multiproc_dir
ENV DEBUG_METRICS=false
EXPOSE 8080
CMD ["/usr/sbin/httpd", "-DFOREGROUND"]