2024-10-11 18:18:33 +02:00
|
|
|
FROM python:3.13-slim
|
2023-07-21 23:57:14 +02:00
|
|
|
LABEL maintainer="Luke Tainton <luke@tainton.uk>"
|
|
|
|
USER root
|
|
|
|
|
2024-11-28 22:56:59 +01:00
|
|
|
ENV PYTHONPATH="/run:/usr/local/lib/python3.13/lib-dynload:/usr/local/lib/python3.13/site-packages:/usr/local/lib/python3.13"
|
2025-01-03 19:12:11 +01:00
|
|
|
ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
|
|
|
|
|
2023-07-21 23:57:14 +02:00
|
|
|
WORKDIR /run
|
|
|
|
|
2024-11-28 22:56:59 +01:00
|
|
|
COPY imp.py /run/imp.py
|
|
|
|
|
2023-07-21 23:57:14 +02:00
|
|
|
RUN mkdir -p /.local && \
|
|
|
|
chmod -R 777 /.local && \
|
2025-01-03 19:12:11 +01:00
|
|
|
pip install -U pip uv==0.5.14
|
2023-07-21 23:57:14 +02:00
|
|
|
|
2024-11-28 21:54:12 +01:00
|
|
|
COPY pyproject.toml /run/pyproject.toml
|
2025-01-03 19:12:11 +01:00
|
|
|
COPY uv.lock /run/uv.lock
|
|
|
|
# needed for PDM build
|
|
|
|
COPY README.md /run/README.md
|
2024-11-28 21:54:12 +01:00
|
|
|
|
2025-01-03 19:12:11 +01:00
|
|
|
RUN uv sync --frozen
|
2023-07-21 23:57:14 +02:00
|
|
|
|
2023-12-14 21:55:17 +01:00
|
|
|
ENTRYPOINT ["python3", "-B", "-m", "app.main"]
|
2023-07-21 23:57:14 +02:00
|
|
|
|
2024-04-21 18:20:58 +02:00
|
|
|
ARG version="dev"
|
|
|
|
ENV APP_VERSION=$version
|
|
|
|
|
2023-12-14 21:55:17 +01:00
|
|
|
COPY app /run/app
|