FROM python:3.13-alpine # Set working directory WORKDIR /app # Install required packages RUN apk add --no-cache \ gcc \ musl-dev \ sqlite \ sqlite-dev \ curl \ unzip \ make # Download and build SQLite json1 extension RUN curl -O http://sqlite.org/2016/sqlite-src-3140100.zip && \ unzip sqlite-src-3140100.zip && \ gcc -g -fPIC -shared sqlite-src-3140100/ext/misc/json1.c -o json1.so && \ rm -rf sqlite-src-3140100.zip sqlite-src-3140100 # Copy application files COPY requirements.txt . COPY app/ /app/ # Install Python dependencies # Default command CMD ["flask", "run"]