Optimize Alpine Dockerfile by removing redundant apk commands (#5016)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s

Remove unnecessary `apk update` and manual cache cleanup steps in the
Alpine Dockerfile. By using `apk add --no-cache`, we avoid manual cache
management, making the Dockerfile simpler and easier to maintain.
This commit is contained in:
Peter Dave Hello 2025-02-16 00:55:12 +08:00 committed by GitHub
parent 0ffd99afff
commit c6026ea6f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,9 +11,7 @@ FROM $LITELLM_BUILD_IMAGE AS builder
WORKDIR /app
# Install build dependencies
RUN apk update && \
apk add --no-cache gcc python3-dev musl-dev && \
rm -rf /var/cache/apk/*
RUN apk add --no-cache gcc python3-dev musl-dev
RUN pip install --upgrade pip && \
pip install build