fix(rln-relay): enables rln compilation on the docker (#1235)

This commit is contained in:
Sanaz Taheri Boshrooyeh 2022-10-05 12:06:03 -07:00 committed by GitHub
parent 2c975597e1
commit 091ea33158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ FROM alpine:3.16 AS nim-build
ARG NIMFLAGS
ARG MAKE_TARGET=wakunode2
ARG RLN=true
# Get build tools and required header files
RUN apk add --no-cache bash git cargo build-base pcre-dev linux-headers
@ -27,7 +28,7 @@ RUN git submodule update --init --recursive
RUN make -j$(nproc) deps
# Build the final node binary
RUN make -j$(nproc) $MAKE_TARGET NIMFLAGS="$NIMFLAGS"
RUN make -j$(nproc) $MAKE_TARGET NIMFLAGS="$NIMFLAGS" RLN="$RLN"
# ACTUAL IMAGE -------------------------------------------------------
@ -52,6 +53,10 @@ RUN ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
# Copy to separate location to accomodate different MAKE_TARGET values
COPY --from=nim-build /app/build/$MAKE_TARGET /usr/local/bin/
# If rln enabled: fix for 'Error loading shared library vendor/rln/target/debug/librln.so: No such file or directory'
COPY --from=nim-build /app/vendor/zerokit/target/release/librln.so vendor/zerokit/target/release/librln.so
COPY --from=nim-build /app/vendor/zerokit/rln/resources/ vendor/zerokit/rln/resources/
# Copy migration scripts for DB upgrades
COPY --from=nim-build /app/waku/v2/node/storage/migration/migrations_scripts/ /app/waku/v2/node/storage/migration/migrations_scripts/