This repository was archived by the owner on Aug 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (39 loc) · 1.35 KB
/
Copy pathDockerfile
File metadata and controls
60 lines (39 loc) · 1.35 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
### Build privacyidea container including gssapi (Kerberos) and hsm
### build stage
###
FROM cgr.dev/chainguard/wolfi-base AS builder
ARG PYVERSION=3.12
ENV LANG=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PATH="/ort/.poetry/bin:${PATH}"
WORKDIR /ort
RUN apk add python-${PYVERSION} wget && \
chown -R nonroot:nonroot /ort/
USER nonroot
RUN wget -O get-poetry.py https://install.python-poetry.org && \
export POETRY_HOME=/ort/.poetry && python3 get-poetry.py && \
rm get-poetry.py
COPY poetry.lock pyproject.toml README.md ./
COPY app/ /ort/app
ENV PATH="/ort/.poetry/bin:${PATH}"
RUN poetry config virtualenvs.in-project true && \
poetry install --no-root
# COPY .env_example /ort/.env
### final stage
###
FROM cgr.dev/chainguard/wolfi-base
ARG PYVERSION=3.12
ENV PYTHONUNBUFFERED=1
ENV PATH="/ort/.poetry/bin:${PATH}"
ENV POETRY_HOME="/ort/.poetry"
LABEL maintainer="Marco Moenig <info@moenig.it>"
#LABEL org.opencontainers.image.source="https://github.com/gpappsoft/"
#LABEL org.opencontainers.image.url="https://github.com/gpappsoft/"
LABEL org.opencontainers.image.description="ORT - open route tracker"
WORKDIR /ort
RUN apk add python-${PYVERSION}
COPY --from=builder /ort/ /ort
USER nonroot
EXPOSE ${PORT}
ENTRYPOINT ["poetry", "run","uvicorn", "--workers", "4", "--host", "0.0.0.0", "--port", "5000", "app.main:app"]