From 747e9db5821d1b7a5571d451efba975a0c9480a4 Mon Sep 17 00:00:00 2001 From: Rene Luria Date: Wed, 1 Oct 2025 16:22:48 +0200 Subject: [PATCH] chore: use python image 3.13-slim instead of 3.13-alpine --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9e655ce..53e0153 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ # Multi-stage build to create a minimal image -FROM python:3.13-alpine AS builder +FROM python:3.13-slim AS builder # Create working directory WORKDIR /app +# poetry export -f requirements.txt --output requirements.txt --without-hashes # Copy dependency files COPY requirements.txt ./ @@ -11,10 +12,7 @@ COPY requirements.txt ./ RUN pip install --no-cache-dir --no-deps --disable-pip-version-check --target=/app/site-packages -r requirements.txt # Use Alpine as the base image for a much smaller footprint -FROM python:3.13-alpine - -# Install ca-certificates for SSL/HTTPS support and tzdata for timezone support -RUN apk add --no-cache ca-certificates tzdata +FROM python:3.13-slim # Copy installed packages from builder stage COPY --from=builder /app/site-packages /app/site-packages @@ -30,7 +28,7 @@ ENV PYTHONPATH=/app/site-packages WORKDIR /app # Create a non-root user for security -RUN adduser -D -u 1000 myice +RUN useradd --home-dir /app --no-create-home --uid 1000 myice USER myice # Expose port