Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Remove redundant `apk update` in Dockerfiles (cc #5016) (#9055)

Peter Dave Hello6b67006b0c68
diff --git a/Dockerfile b/Dockerfile
index e0ae2ed0911..3a74c46e688 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,8 +12,7 @@ WORKDIR /app
USER root
# Install build dependencies
-RUN apk update && \
- apk add --no-cache gcc python3-dev openssl openssl-dev
+RUN apk add --no-cache gcc python3-dev openssl openssl-dev
RUN pip install --upgrade pip && \
@@ -52,8 +51,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtime
USER root
# Install runtime dependencies
-RUN apk update && \
- apk add --no-cache openssl
+RUN apk add --no-cache openssl
WORKDIR /app
# Copy the current directory contents into the container at /app
diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine
index cc0c434013d..f036081549a 100644
--- a/docker/Dockerfile.alpine
+++ b/docker/Dockerfile.alpine
@@ -35,7 +35,7 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
FROM $LITELLM_RUNTIME_IMAGE AS runtime
# Update dependencies and clean up
-RUN apk update && apk upgrade && rm -rf /var/cache/apk/*
+RUN apk upgrade --no-cache
WORKDIR /app
diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database
index f0b5eec8f91..da0326fd2cd 100644
--- a/docker/Dockerfile.database
+++ b/docker/Dockerfile.database
@@ -12,8 +12,7 @@ WORKDIR /app
USER root
# Install build dependencies
-RUN apk update && \
- apk add --no-cache gcc python3-dev openssl openssl-dev
+RUN apk add --no-cache gcc python3-dev openssl openssl-dev
RUN pip install --upgrade pip && \
@@ -44,8 +43,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtime
USER root
# Install runtime dependencies
-RUN apk update && \
- apk add --no-cache openssl
+RUN apk add --no-cache openssl
WORKDIR /app
# Copy the current directory contents into the container at /app