aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: 879dcc847a0e2d48450ec8bee54d663b80e8d4b4 (plain)
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
FROM ubuntu:focal

# deaktiviert Nachfragen beim installieren von Paketen
ENV DEBIAN_FRONTEND=noninteractive

# hadolint ignore=DL3008,DL3028,DL4006
RUN apt-get update && \
   	apt-get -y --no-install-recommends install \
		python3-pip curl && \
		apt-get clean && \
	  rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

WORKDIR /app

COPY templates/file_list.html ./templates/
COPY requirements.txt .
COPY app.py .
COPY gunicorn_config.py .

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 5000

HEALTHCHECK --interval=5s --timeout=3s \
  CMD curl -f http://localhost:5000/health || exit 1

#CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
CMD [ "python3", "-m" , "gunicorn", "app:app", "-c", "gunicorn_config.py"]