From 18f0d51386d2fd083e02951340d12c52ab14f77f Mon Sep 17 00:00:00 2001 From: Dave Page Date: Tue, 19 May 2026 17:33:17 +0100 Subject: [PATCH] fix(docker): ship libpq-oauth-18.so and libcurl for PostgreSQL 18 OAuth libpq 18 dlopens libpq-oauth-18.so (the SASL OAUTHBEARER flow plugin) when connecting to a server with an `oauth` pg_hba.conf rule. The container previously copied only libpq.so.5.18 from postgres:18-alpine and omitted both the plugin and its libcurl runtime dependency, so OAuth connections failed with "no OAuth flows are available (try installing the libpq-oauth package)" before any token exchange could begin. Add libpq-oauth-18.so to the existing pg18-builder COPY (it sits next to libpq.so.5.18 in /usr/local/lib in postgres:18-alpine) and install the libcurl apk package so the plugin can dlopen libcurl.so.4 at runtime. Closes #9951 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a219bfd959b..c805fc48399 100644 --- a/Dockerfile +++ b/Dockerfile @@ -159,6 +159,7 @@ RUN apk update && apk upgrade && \ bash \ postfix \ krb5-libs \ + libcurl \ libjpeg-turbo \ shadow \ sudo \ @@ -174,7 +175,7 @@ COPY --from=env-builder /venv /venv # Copy in the tools COPY --from=tool-builder /usr/local/pgsql /usr/local/ -COPY --from=pg18-builder /usr/local/lib/libpq.so.5.18 /usr/lib/liblz4.so.1.10.0 /usr/lib/ +COPY --from=pg18-builder /usr/local/lib/libpq.so.5.18 /usr/local/lib/libpq-oauth-18.so /usr/lib/liblz4.so.1.10.0 /usr/lib/ RUN ln -s libpq.so.5.18 /usr/lib/libpq.so.5 && \ ln -s libpq.so.5.18 /usr/lib/libpq.so && \