Skip to content

Commit

Permalink
works?
Browse files Browse the repository at this point in the history
  • Loading branch information
onurctirtir committed Jan 3, 2025
1 parent 31af9c0 commit cd8f612
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions circleci/images/exttester/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
FROM buildpack-deps:bullseye AS bullseye-no-libpq

RUN <<'EOF'
rm /usr/lib/x86_64-linux-gnu/libpq.so*

DEBIAN_FRONTEND=noninteractive apt purge -y libpq5
EOF

# postgres doesn't ship their isolation tester in the server-dev images
# we use this builder to build the isolation tester from a specific version
FROM buildpack-deps:bullseye AS dev-tools-builder
FROM bullseye-no-libpq AS dev-tools-builder

RUN <<'EOF'
# install dependencies
Expand Down Expand Up @@ -65,7 +73,7 @@ WORKDIR /build/postgresql-${PG_VERSION_CLEAN}/build
RUN ../configure --prefix /usr/lib/postgresql/${PG_MAJOR}/
RUN make -sj8

FROM buildpack-deps:bullseye AS dev-tools-collection
FROM bullseye-no-libpq AS dev-tools-collection

WORKDIR /collect

Expand All @@ -84,7 +92,7 @@ COPY --from=dev-tools-builder /build/postgresql-${PG_VERSION_CLEAN}/build/src/te
COPY --from=dev-tools-builder /build/postgresql-${PG_VERSION_CLEAN}/src/test/regress/ usr/lib/postgresql/${PG_MAJOR}/lib/regress/
RUN rm -rf usr/lib/postgresql/${PG_MAJOR}/lib/regress/*.c usr/lib/postgresql/${PG_MAJOR}/lib/regress/*.h

FROM buildpack-deps:bullseye
FROM bullseye-no-libpq

# add unpriviliged user for tests
RUN useradd -ms /bin/bash circleci
Expand Down Expand Up @@ -170,15 +178,6 @@ apt-get install -y --no-install-recommends --allow-downgrades \
postgresql-${PG_MAJOR}-dbgsym=${pgdg_version} \
postgresql-server-dev-${PG_MAJOR}=${pgdg_version} \
postgresql-${PG_MAJOR}-wal2json \


DEBIAN_FRONTEND=noninteractive apt purge -y \
libpq5 \

# remove libpq.so and the symlinkes to it, if any
[ -n "$(ls /usr/lib/x86_64-linux-gnu/libpq.so* 2>/dev/null)" ] && rm /usr/lib/x86_64-linux-gnu/libpq.so*

apt-get install -y --no-install-recommends --allow-downgrades \
libpq-dev=${pgdg_version} \
libpq5=${pgdg_version} \

Expand Down

0 comments on commit cd8f612

Please sign in to comment.