fix remove libpcre lib dependency used for docker builds (#3552)

* fix libpcre installation in Dockerfile for debian:stable-slim

Seems with debian:stable-slim now points to Debian Bookworm and that made libpcre3 deprecated we have a failing docker build.

* remove libpcre3 dependency completely as we dont use Nims std/re regex lib.

* Remove all remaining reference to pcre library in our image builds
This commit is contained in:
NagyZoltanPeter 2025-08-29 06:52:56 +02:00 committed by GitHub
parent 84cfdba010
commit 4db4f830f5
4 changed files with 6 additions and 15 deletions

View File

@ -7,7 +7,7 @@ ARG NIM_COMMIT
ARG LOG_LEVEL=TRACE
# Get build tools and required header files
RUN apk add --no-cache bash git build-base openssl-dev pcre-dev linux-headers curl jq
RUN apk add --no-cache bash git build-base openssl-dev linux-headers curl jq
WORKDIR /app
COPY . .
@ -41,10 +41,7 @@ LABEL version="unknown"
EXPOSE 30303 60000 8545
# Referenced in the binary
RUN apk add --no-cache libgcc pcre-dev libpq-dev bind-tools
# Fix for 'Error loading shared library libpcre.so.3: No such file or directory'
RUN ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
RUN apk add --no-cache libgcc libpq-dev bind-tools
# Copy to separate location to accomodate different MAKE_TARGET values
COPY --from=nim-build /app/build/$MAKE_TARGET /usr/local/bin/

View File

@ -7,7 +7,7 @@ ARG NIM_COMMIT
ARG LOG_LEVEL=TRACE
# Get build tools and required header files
RUN apk add --no-cache bash git build-base openssl-dev pcre-dev linux-headers curl jq
RUN apk add --no-cache bash git build-base openssl-dev linux-headers curl jq
WORKDIR /app
COPY . .
@ -40,7 +40,7 @@ LABEL version="unknown"
EXPOSE 30303 60000 8545
# Referenced in the binary
RUN apk add --no-cache libgcc pcre-dev libpq-dev \
RUN apk add --no-cache libgcc libpq-dev \
wget \
iproute2 \
python3

View File

@ -13,12 +13,9 @@ EXPOSE 30303 60000 8545
# Referenced in the binary
RUN apt-get update &&\
apt-get install -y libpcre3 libpq-dev curl iproute2 wget dnsutils &&\
apt-get install -y libpq-dev curl iproute2 wget dnsutils &&\
apt-get clean && rm -rf /var/lib/apt/lists/*
# Fix for 'Error loading shared library libpcre.so.3: No such file or directory'
RUN ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
# Copy to separate location to accomodate different MAKE_TARGET values
ADD ./build/$MAKE_TARGET /usr/local/bin/

View File

@ -20,7 +20,4 @@ pkgs.mkShell {
nim-unwrapped-2_0
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.pcre
];
}