From 36627a61a366cbb1ad56624b98f815a50e5c131f Mon Sep 17 00:00:00 2001 From: yucheng Date: Thu, 24 Sep 2026 23:32:28 +0000 Subject: [PATCH] build: ship libpq in the backend, gateway and migrations images for psycopg Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- backend/Dockerfile | 2 +- gateway/Dockerfile | 2 +- migrations/Dockerfile | 2 +- tests/integration/database/test_spend_logs_partition_driver.py | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 59f836b55f8..7f0829223b7 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -75,7 +75,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtime USER root RUN for i in 1 2 3; do \ - apk add --no-cache bash openssl tzdata python-3.13 libsndfile libatomic && break; \ + apk add --no-cache bash openssl tzdata python-3.13 libsndfile libatomic libpq-18 && break; \ [ $i = 3 ] && { echo "apk add failed after 3 retries" >&2; exit 1; }; \ sleep 5; \ done diff --git a/gateway/Dockerfile b/gateway/Dockerfile index 8045a8b64cb..f5667bcbbd0 100644 --- a/gateway/Dockerfile +++ b/gateway/Dockerfile @@ -93,7 +93,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtime USER root RUN for i in 1 2 3; do \ - apk add --no-cache bash openssl tzdata python-3.13 libsndfile libatomic libevent && break; \ + apk add --no-cache bash openssl tzdata python-3.13 libsndfile libatomic libevent libpq-18 && break; \ [ $i = 3 ] && { echo "apk add failed after 3 retries" >&2; exit 1; }; \ sleep 5; \ done diff --git a/migrations/Dockerfile b/migrations/Dockerfile index 255b94b0ea8..f4b144118f3 100644 --- a/migrations/Dockerfile +++ b/migrations/Dockerfile @@ -89,7 +89,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtime USER root RUN for i in 1 2 3; do \ - apk add --no-cache bash openssl tzdata python-3.13 nodejs libsndfile libatomic && break; \ + apk add --no-cache bash openssl tzdata python-3.13 nodejs libsndfile libatomic libpq-18 && break; \ [ $i = 3 ] && { echo "apk add failed after 3 retries" >&2; exit 1; }; \ sleep 5; \ done diff --git a/tests/integration/database/test_spend_logs_partition_driver.py b/tests/integration/database/test_spend_logs_partition_driver.py index 2474e16bd55..cdcfe9e6c54 100644 --- a/tests/integration/database/test_spend_logs_partition_driver.py +++ b/tests/integration/database/test_spend_logs_partition_driver.py @@ -22,6 +22,9 @@ IMAGE_DOCKERFILES: Final = ( REPO_ROOT / "Dockerfile", REPO_ROOT / "docker" / "Dockerfile.database", REPO_ROOT / "docker" / "Dockerfile.non_root", + REPO_ROOT / "backend" / "Dockerfile", + REPO_ROOT / "gateway" / "Dockerfile", + REPO_ROOT / "migrations" / "Dockerfile", ) PURE_PYTHON_DRIVER: Final = {"PSYCOPG_IMPL": "python"}