From c6026ea6f95f5ec99ef7642ee4df395fd362fc49 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Sun, 16 Feb 2025 00:55:12 +0800 Subject: [PATCH] Optimize Alpine Dockerfile by removing redundant apk commands (#5016) 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. --- docker/Dockerfile.alpine | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index 70ab9cac01..cc0c434013 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -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