generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (23 loc) · 808 Bytes
/
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
FROM python:3.12.1-alpine3.18
RUN addgroup -S appgroup && adduser -S appuser -G appgroup -u 1051
RUN apk add --no-cache --no-progress \
libffi-dev \
build-base \
curl \
&& apk update \
&& apk upgrade --no-cache --available
WORKDIR /app/operations-engineering-reports
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
COPY report_app report_app
COPY operations_engineering_reports.py operations_engineering_reports.py
RUN pip3 install --no-cache-dir pipenv==2024.1.0 \
&& pipenv install --system --deploy --ignore-pipfile
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
USER 1051
EXPOSE 4567
HEALTHCHECK --interval=60s --timeout=30s CMD curl -I -XGET http://localhost:4567 || exit 1
ENTRYPOINT gunicorn operations_engineering_reports:app \
--bind 0.0.0.0:4567 \
--timeout 120