FROM python:3.12-alpine

COPY requirements.txt /

RUN set -ex ;\
    apk add --no-cache musl-dev mariadb-connector-c-dev gcc ;\
    pip3 install -r /requirements.txt ;\
    pip3 cache purge ;\
    apk del --rdepends --purge musl-dev gcc

WORKDIR /app
