From 135d596119f4131bd8b9c630e7f6c94fdf224646 Mon Sep 17 00:00:00 2001 From: Eaven Kimura Date: Mon, 29 Sep 2025 04:52:17 +0000 Subject: [PATCH] Fix: Dependency update for Docker image --- dockerfile | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/dockerfile b/dockerfile index e14ae1c..bf4b633 100644 --- a/dockerfile +++ b/dockerfile @@ -18,16 +18,13 @@ COPY requirements.txt . RUN --mount=type=cache,target=/root/.cache/pip \ pip install --no-cache-dir -r requirements.txt -# Final stage - using Alpine with build dependencies -FROM python:3.11-alpine3.18 +# Final stage - using slim instead of alpine +FROM python:3.11-slim -# Install runtime and build dependencies -RUN apk add --no-cache \ +# Install minimal runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ tini \ - build-base \ - python3-dev \ - openblas-dev \ - && rm -rf /var/cache/apk/* + && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app @@ -36,11 +33,8 @@ WORKDIR /app COPY --from=builder /opt/venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" -# Reinstall numpy to ensure Alpine compatibility -RUN pip install --no-cache-dir --force-reinstall numpy - # Create a non-root user -RUN addgroup -S bot && adduser -S bot -G bot +RUN groupadd -r bot && useradd -r -g bot bot # Copy necessary files COPY --chown=bot:bot *.py ./