Skip to content

Commit d306281

Browse files
committed
Reinstall libpq5 and set LD_PRELOAD in Dockerfiles for extbuilder and exttester
1 parent 70285a8 commit d306281

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

circleci/images/extbuilder/Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,19 @@ apt-get install -y --no-install-recommends --allow-downgrades \
7171
rm -rf /var/lib/apt/lists/*
7272
EOF
7373

74+
# ---------- copy helper binaries ----------
75+
COPY --from=dev-tools-collection /collect/ /
76+
7477
# now do the symlink (outside the heredoc!) in its own layer
75-
RUN ln -s /usr/lib/x86_64-linux-gnu/libpq.so.5 \
78+
RUN apt-get update && \
79+
apt-get install -y --no-install-recommends --reinstall libpq5 && \
80+
rm -rf /var/lib/apt/lists/* && \
81+
# 4. satisfy RUNPATH
82+
ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \
7683
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5 && \
7784
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf && \
7885
ldconfig
86+
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libpq.so.5"
7987

8088
USER circleci
8189
WORKDIR /home/circleci

circleci/images/exttester/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ RUN apt-get update && \
190190
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5 && \
191191
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf && \
192192
ldconfig
193+
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libpq.so.5"
193194

194195
# add postgress to the path
195196
ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin/:$PATH

0 commit comments

Comments
 (0)