-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (27 loc) · 887 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
34
35
36
37
38
39
# syntax=docker/dockerfile:1
FROM python:3.11 AS base
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.description="Backend server for the RKI metadata exchange."
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="https://github.com/robert-koch-institut/mex-backend"
LABEL org.opencontainers.image.vendor="robert-koch-institut"
ENV PYTHONUNBUFFERED=1
ENV PYTHONOPTIMIZE=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV PIP_NO_INPUT=on
ENV PIP_PREFER_BINARY=on
ENV PIP_PROGRESS_BAR=off
ENV MEX_BACKEND_HOST=0.0.0.0
WORKDIR /app
RUN adduser \
--disabled-password \
--gecos "" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "10001" \
mex
COPY . .
RUN --mount=type=cache,target=/root/.cache/pip pip install -r locked-requirements.txt --no-deps
USER mex
EXPOSE 8080
ENTRYPOINT [ "backend" ]