2023-07-18 04:18:41 +00:00
|
|
|
FROM python:3.11-slim-bookworm AS builder
|
2022-11-30 01:26:43 +00:00
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN pip wheel . --wheel-dir /wheels --find-links /wheels
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-18 04:18:41 +00:00
|
|
|
FROM python:3.11-slim-bookworm AS run
|
2022-11-30 01:26:43 +00:00
|
|
|
|
|
|
|
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
|