pnut-matrix/Dockerfile

29 lines
738 B
Text
Raw Permalink Normal View History

2024-12-25 15:21:29 +00:00
FROM python:3.13-slim-bookworm AS builder
RUN apt-get update && apt-get install -y wget unzip
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
2020-03-26 05:10:42 +00:00
WORKDIR /usr/src/app
2024-12-25 15:21:29 +00:00
# Work around for the unreleased version of PNUTpy
RUN wget https://github.com/spacenerdmo/PNUTpy/archive/refs/heads/api_v1.zip
RUN unzip api_v1.zip
RUN cd PNUTpy-api_v1 && pip wheel . --wheel-dir /wheels --find-links /wheels
2020-03-26 05:10:42 +00:00
2024-12-25 15:21:29 +00:00
WORKDIR /usr/src/app/pnut-matrix
2020-03-26 05:10:42 +00:00
COPY . .
2024-12-25 15:21:29 +00:00
RUN pip wheel . --wheel-dir /wheels --find-links /wheels
FROM python:3.13-slim-bookworm AS run
COPY --from=builder /wheels /wheels
RUN pip --no-cache-dir install --find-links /wheels --no-index pnut-matrix
VOLUME /data
2020-03-26 05:10:42 +00:00
WORKDIR /data
EXPOSE 5000
2024-12-25 15:21:29 +00:00
CMD [ "bash", "/usr/src/app/run.sh" ]