pnut-matrix/Dockerfile

31 lines
775 B
Text
Raw Normal View History

2024-12-25 07:21:29 -08: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-25 22:10:42 -07:00
WORKDIR /usr/src/app
2024-12-25 07:21:29 -08: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-25 22:10:42 -07:00
2024-12-25 07:21:29 -08:00
WORKDIR /usr/src/app/pnut-matrix
2020-03-25 22:10:42 -07:00
COPY . .
2024-12-25 07:21:29 -08: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
2025-01-15 12:16:52 -08:00
COPY run.sh /usr/local/bin/run.sh
VOLUME /data
2020-03-25 22:10:42 -07:00
WORKDIR /data
EXPOSE 5000
2025-01-15 12:16:52 -08:00
CMD [ "bash", "/usr/local/bin/run.sh" ]