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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Litellm chainguard fixes 12 02 2025 p1 (#17406)
Krish Dholakia74ba18df5590
diff --git a/Dockerfile b/Dockerfileindex f75706805e0..d8397ec4811 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,8 +1,8 @@# Base image for building-ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/python:latest-dev+ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base# Runtime image-ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/python:latest-dev+ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base# Builder stageFROM $LITELLM_BUILD_IMAGE AS builder@@ -12,11 +12,9 @@ WORKDIR /appUSER root# Install build dependencies-RUN apk add --no-cache gcc python3-dev openssl openssl-dev+RUN apk add --no-cache bash gcc py3-pip python3 python3-dev openssl openssl-dev--RUN pip install --upgrade pip>=24.3.1 && \- pip install build+RUN python -m pip install build# Copy the current directory contents into the container at /appCOPY . .@@ -48,10 +46,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtimeUSER root# Install runtime dependencies-RUN apk add --no-cache openssl tzdata nodejs npm--# Upgrade pip to fix CVE-2025-8869-RUN pip install --upgrade pip>=24.3.1+RUN apk add --no-cache bash openssl tzdata nodejs npm python3 py3-pipWORKDIR /app# Copy the current directory contents into the container at /appdiff --git a/docker/Dockerfile.database b/docker/Dockerfile.databaseindex 09b5265191b..0e804cbfd12 100644--- a/docker/Dockerfile.database+++ b/docker/Dockerfile.database@@ -1,8 +1,8 @@# Base image for building-ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/python:latest-dev+ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base# Runtime image-ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/python:latest-dev+ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base# Builder stageFROM $LITELLM_BUILD_IMAGE AS builder@@ -13,13 +13,15 @@ USER root# Install build dependenciesRUN apk add --no-cache \- build-base \+ bash \+ gcc \+ py3-pip \+ python3 \python3-dev \+ openssl \openssl-dev--RUN pip install --upgrade pip && \- pip install build+RUN python -m pip install build# Copy the current directory contents into the container at /appCOPY . .@@ -46,7 +48,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtimeUSER root# Install runtime dependencies-RUN apk add --no-cache openssl+RUN apk add --no-cache bash openssl tzdata nodejs npm python3 py3-pipWORKDIR /app# Copy the current directory contents into the container at /appdiff --git a/docker/Dockerfile.non_root b/docker/Dockerfile.non_rootindex 8b66a367eeb..cd1633e319c 100644--- a/docker/Dockerfile.non_root+++ b/docker/Dockerfile.non_root@@ -1,6 +1,6 @@# Base images-ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/python:latest-dev-ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/python:latest-dev+ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base+ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base# -----------------# Builder Stage@@ -11,6 +11,8 @@ WORKDIR /app# Install build dependencies including Node.js for UI buildUSER rootRUN apk add --no-cache \+ python3 \+ py3-pip \clang \llvm \lld \@@ -71,7 +73,7 @@ WORKDIR /app# Install runtime dependenciesUSER rootRUN apk upgrade --no-cache && \- apk add --no-cache bash libstdc++ ca-certificates openssl supervisor+ apk add --no-cache python3 py3-pip bash openssl tzdata nodejs npm supervisor# Copy only necessary artifacts from builder stage for runtimeCOPY . .