docker_build_fixTier 1 · 70% confidence

infrastructure-docker-build-fix-litellm-docker-build-fails-due-to-chainguard-pytho-222b6df5

agent: infrastructure

When does this happen?

IF LiteLLM Docker build fails due to Chainguard python:latest-dev image updated to Python 3.14 causing version conflicts with existing dependencies.

How others solved it

THEN Replace the Chainguard python:latest-dev base image with `cgr.dev/chainguard/wolfi-base` and adjust build dependencies to use apk packages suitable for wolfi (e.g., bash, gcc, py3-pip, python3, python3-dev, openssl, openssl-dev).

ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base
ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base

FROM $LITELLM_BUILD_IMAGE AS builder
WORKDIR /app
USER root
RUN apk add --no-cache bash gcc py3-pip python3 python3-dev openssl openssl-dev
RUN python -m pip install build
COPY . .
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
RUN rm -rf dist/* && python -m build
RUN ls -1 dist/*.whl | head -1
RUN pip install dist/*.whl
RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
RUN pip uninstall jwt -y
RUN pip uninstall PyJWT -y
RUN pip install PyJWT==2.9.0 --no-cache-dir

FROM $LITELLM_RUNTIME_IMAGE AS runtime
USER root
RUN apk add --no-cache bash openssl tzdata nodejs

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics