Skip to content

Commit

Permalink
make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
onurctirtir committed Jan 3, 2025
1 parent 0a52043 commit 8b26747
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 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 @@ -157,9 +165,6 @@ curl -sf https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_
echo "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
echo "deb https://apt-archive.postgresql.org/pub/repos/apt bullseye-pgdg-archive main" >> /etc/apt/sources.list.d/postgresql.list

DEBIAN_FRONTEND=noninteractive apt purge -y \
libpq5 \

apt-get update

# infer the pgdgversion of postgres based on the $PG_VERSION
Expand Down

0 comments on commit 8b26747

Please sign in to comment.