Skip to content

Commit 6debf7c

Browse files
authored
fix: revert switch from -alpine to -slim base docker image (#173)
1 parent 382525c commit 6debf7c

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
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
65
RUN pip install poetry==2.2.1
76

87
WORKDIR /app
@@ -15,22 +14,20 @@ COPY ./src/quickapp /app/quickapp
1514
COPY ./config/predefined /app/predefined
1615
RUN 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

2423
WORKDIR /app
2524

2625
ENV 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
3431
COPY --chown=appuser --from=builder /app .
3532

3633
RUN echo '#!/bin/sh' > /docker_entrypoint.sh && \

src/tests/integration_tests/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM python:3.13-slim AS test-builder
1+
FROM python:3.13-alpine AS test-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/*
6-
RUN pip install poetry==2.2.1
3+
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3
4+
RUN apk add --no-cache gcc alpine-sdk linux-headers musl-dev git
5+
RUN pip install poetry==2.1.1
76

87
WORKDIR /app
98

@@ -24,13 +23,13 @@ COPY ./integration_tests ./integration_tests
2423

2524

2625
# Stage 2: Test runtime (reuse app runtime base for infra)
27-
FROM python:3.13-slim AS test-runtime
28-
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
26+
FROM python:3.13-alpine AS test-runtime
27+
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libexpat
2928

3029
WORKDIR /app
31-
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
30+
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 CHROME_BIN=/usr/bin/chromium
3231

33-
RUN useradd -u 1001 -r -s /sbin/nologin appuser
32+
RUN adduser -u 1001 --disabled-password --gecos "" appuser
3433
COPY --chown=appuser --from=test-builder /app .
3534

3635
COPY --chown=appuser << 'EOF' /docker_test_entrypoint.sh && chmod +x /docker_test_entrypoint.sh

0 commit comments

Comments
 (0)