add Dockerfile

This commit is contained in:
Morgan McMillian 2022-11-29 17:26:43 -08:00
parent 43ce25a873
commit 18c6290d0f
2 changed files with 31 additions and 1 deletions

View file

@ -8,4 +8,6 @@ __pycache__/
.git/ .git/
.gitignore .gitignore
Dockerfile Dockerfile
.dockerignore .dockerignore
snap/
Jenkinsfile

28
Dockerfile Normal file
View file

@ -0,0 +1,28 @@
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