Files
pypilot/Dockerfile
Luke Tainton 3f0df932e0
All checks were successful
Sonar / ci (push) Successful in 53s
fix(docker): update Python version in Dockerfile and adjust user permissions (#438)
Co-authored-by: Copilot <copilot@github.com>
Reviewed-on: #438
2026-04-17 18:46:26 +00:00

31 lines
740 B
Docker

FROM python:3.14-slim
LABEL maintainer="Luke Tainton <luke@tainton.uk>"
LABEL org.opencontainers.image.source="https://github.com/luketainton/pypilot"
USER root
RUN useradd -r -s /sbin/nologin -M user
ENV PYTHONPATH="/run:/usr/local/lib/python3.14/lib-dynload:/usr/local/lib/python3.14/site-packages:/usr/local/lib/python3.14"
WORKDIR /run
RUN mkdir -p /.local && \
chmod -R 777 /.local && \
pip install --no-cache-dir -U pip uv==0.5.14
COPY pyproject.toml /run/pyproject.toml
COPY uv.lock /run/uv.lock
# needed for PDM build
COPY README.md /run/README.md
RUN uv sync --frozen
ENTRYPOINT ["python3", "-B", "-m", "app.main"]
ARG version="dev"
ENV APP_VERSION=$version
COPY app /run/app
RUN chown -R user:user /run
USER user