partybot/Dockerfile
2022-11-29 17:26:43 -08:00

28 lines
518 B
Docker

FROM python:3.10-slim-bullseye AS builder
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
WORKDIR /usr/src/app
COPY . .
RUN pip wheel . --wheel-dir /wheels --find-links /wheels
FROM python:3.10-slim-bullseye AS run
COPY --from=builder /wheels /wheels
RUN pip --no-cache-dir install --find-links /wheels --no-index partybot
RUN addgroup -gid 2022 partybot \
&& adduser --home /data --uid 2022 --gid 2022 --disabled-password partybot
USER partybot
VOLUME /data
WORKDIR /data
CMD partybot