FROM python:3.12-slim@sha256:a6e34c598f2467ed0e9a8d349809fcd8b5c603269512df273a0bb1784edc11b1
WORKDIR /app
COPY requirements.txt /app/requirements.txt
COPY wheelhouse/ /wheels/
RUN python -m pip install --no-index --find-links=/wheels --no-cache-dir -r requirements.txt
COPY runtime/ /app/
COPY entry.py hosted_signup.py /app/
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
RUN useradd --uid 10001 --create-home homelab
USER 10001:10001
ENTRYPOINT ["python", "/app/entry.py"]
