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]

docker - handle debian issue on docker builds (#5752)

Ishaan Jaff4f9f505ebe89
diff --git a/Dockerfile b/Dockerfile
index c452c09ce0c..20022b07ae3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -49,6 +49,9 @@ RUN chmod +x build_admin_ui.sh && ./build_admin_ui.sh
# Runtime stage
FROM $LITELLM_RUNTIME_IMAGE AS runtime
+# Update dependencies and clean up - handles debian security issue
+RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
+
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . .
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 3a1b7fedd08..889cb3836d1 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -36,6 +36,9 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
# Runtime stage
FROM $LITELLM_RUNTIME_IMAGE AS runtime
+# Update dependencies and clean up - handles debian security issue
+RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
+
WORKDIR /app
# Copy the built wheel from the builder stage to the runtime stage; assumes only one wheel file is present
diff --git a/Dockerfile.database b/Dockerfile.database
index 1e849b13a78..7434f5533f7 100644
--- a/Dockerfile.database
+++ b/Dockerfile.database
@@ -38,6 +38,9 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
# Runtime stage
FROM $LITELLM_RUNTIME_IMAGE AS runtime
+# Update dependencies and clean up - handles debian security issue
+RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
+
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . .