1- FROM python:3.13-slim AS builder
1+ FROM python:3.13-alpine AS builder
22
3- RUN apt-get update && apt-get install -y --no-install-recommends \
4- gcc build-essential git \
5- && rm -rf /var/lib/apt/lists/*
3+ RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 zlib
4+ RUN apk add --no-cache gcc alpine-sdk linux-headers musl-dev git
65RUN pip install poetry==2.2.1
76
87WORKDIR /app
@@ -15,22 +14,20 @@ COPY ./src/quickapp /app/quickapp
1514COPY ./config/predefined /app/predefined
1615RUN poetry install --no-interaction --no-ansi --no-cache --only main
1716
18- FROM python:3.13-slim AS runtime
17+ FROM python:3.13-alpine AS runtime
1918
20- RUN apt-get update && apt-get install -y -- no-install-recommends \
21- chromium fonts-freefont-ttf wget \
22- && rm -rf /var/lib/apt/lists/*
19+ RUN apk update && apk upgrade -- no-cache libcrypto3 libssl3 libexpat zlib
20+
21+ RUN apk add --no-cache chromium nss freetype harfbuzz ttf-freefont libstdc++
2322
2423WORKDIR /app
2524
2625ENV PYTHONDONTWRITEBYTECODE=1 \
2726 PYTHONUNBUFFERED=1 \
28- PYDANTIC_V2=True \
29- BROWSER_PATH=/usr/bin/chromium \
30- CHROME_BIN=/usr/bin/chromium
27+ PYDANTIC_V2=True
3128
3229# Copy the sources and virtual env. No poetry.
33- RUN useradd -u 1001 -r -s /sbin/nologin appuser
30+ RUN adduser -u 1001 --disabled-password --gecos "" appuser
3431COPY --chown=appuser --from=builder /app .
3532
3633RUN echo '#!/bin/sh' > /docker_entrypoint.sh && \
0 commit comments