diff --git a/.dockerignore b/.dockerignore index af7128c..c2f4287 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,4 +8,6 @@ __pycache__/ .git/ .gitignore Dockerfile -.dockerignore \ No newline at end of file +.dockerignore +snap/ +Jenkinsfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6fa41c2 --- /dev/null +++ b/Dockerfile @@ -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