feat: switch to alpine image

This commit is contained in:
2023-12-30 13:22:17 +01:00
parent 95db2f4b9f
commit 1860cba273

View File

@@ -1,18 +1,13 @@
FROM python:3.9-slim-bookworm
RUN apt update
RUN apt install python3-pip -y
RUN python3 -m pip install --upgrade pip
RUN apt install curl -y
RUN apt autoremove -y
RUN apt clean
FROM alpine
RUN apk add --no-cache py3-pip
RUN apk add --no-cache curl
WORKDIR /app
RUN python3 -m pip install waitress
RUN python3 -m pip install --no-cache-dir --break-system-packages waitress
COPY req.txt .
RUN python3 -m pip install --no-cache-dir -r req.txt
RUN python3 -m pip install --no-cache-dir --break-system-packages -r req.txt
# precreate database directory for mount (will otherwise be created at before_first_request)
COPY ./ .