-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,832 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 38 additions & 39 deletions
77
apps/liteprotocoltester/Dockerfile.liteprotocoltester.compile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,57 @@ | ||
# BUILD NIM APP ---------------------------------------------------------------- | ||
FROM rust:1.77.1-alpine3.18 AS nim-build | ||
FROM rust:1.77.1-alpine3.18 AS nim-build | ||
|
||
ARG NIMFLAGS | ||
ARG MAKE_TARGET=liteprotocoltester | ||
ARG NIM_COMMIT | ||
ARG LOG_LEVEL=DEBUG | ||
ARG NIMFLAGS | ||
ARG MAKE_TARGET=liteprotocoltester | ||
ARG NIM_COMMIT | ||
ARG LOG_LEVEL=TRACE | ||
|
||
# Get build tools and required header files | ||
RUN apk add --no-cache bash git build-base pcre-dev linux-headers curl jq | ||
# Get build tools and required header files | ||
RUN apk add --no-cache bash git build-base openssl-dev pcre-dev linux-headers curl jq | ||
|
||
WORKDIR /app | ||
COPY . . | ||
WORKDIR /app | ||
COPY . . | ||
|
||
# workaround for alpine issue: https://github.com/alpinelinux/docker-alpine/issues/383 | ||
RUN apk update && apk upgrade | ||
# workaround for alpine issue: https://github.com/alpinelinux/docker-alpine/issues/383 | ||
RUN apk update && apk upgrade | ||
|
||
# Ran separately from 'make' to avoid re-doing | ||
RUN git submodule update --init --recursive | ||
# Ran separately from 'make' to avoid re-doing | ||
RUN git submodule update --init --recursive | ||
|
||
# Slowest build step for the sake of caching layers | ||
RUN make -j$(nproc) deps QUICK_AND_DIRTY_COMPILER=1 ${NIM_COMMIT} | ||
# Slowest build step for the sake of caching layers | ||
RUN make -j$(nproc) deps QUICK_AND_DIRTY_COMPILER=1 ${NIM_COMMIT} | ||
|
||
# Build the final node binary | ||
RUN make -j$(nproc) ${NIM_COMMIT} $MAKE_TARGET LOG_LEVEL=${LOG_LEVEL} NIMFLAGS="${NIMFLAGS}" | ||
# Build the final node binary | ||
RUN make -j$(nproc) ${NIM_COMMIT} $MAKE_TARGET LOG_LEVEL=${LOG_LEVEL} NIMFLAGS="${NIMFLAGS}" | ||
|
||
|
||
# PRODUCTION IMAGE ------------------------------------------------------------- | ||
# PRODUCTION IMAGE ------------------------------------------------------------- | ||
|
||
FROM alpine:3.18 AS prod | ||
FROM alpine:3.18 AS prod | ||
|
||
ARG MAKE_TARGET=liteprotocoltester | ||
ARG MAKE_TARGET=liteprotocoltester | ||
|
||
LABEL maintainer="jakub@status.im" | ||
LABEL source="https://github.com/waku-org/nwaku" | ||
LABEL description="Lite Protocol Tester: Waku light-client" | ||
LABEL commit="unknown" | ||
LABEL version="unknown" | ||
LABEL maintainer="zoltan@status.im" | ||
LABEL source="https://github.com/waku-org/nwaku" | ||
LABEL description="Lite Protocol Tester: Waku light-client" | ||
LABEL commit="unknown" | ||
LABEL version="unknown" | ||
|
||
# DevP2P, LibP2P, and JSON RPC ports | ||
EXPOSE 30303 60000 8545 | ||
# DevP2P, LibP2P, and JSON RPC ports | ||
EXPOSE 30303 60000 8545 | ||
|
||
# Referenced in the binary | ||
RUN apk add --no-cache libgcc pcre-dev libpq-dev | ||
# Referenced in the binary | ||
RUN apk add --no-cache libgcc pcre-dev libpq-dev \ | ||
wget \ | ||
iproute2 | ||
|
||
# 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 | ||
# 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 | ||
COPY --from=nim-build /app/build/$MAKE_TARGET /usr/bin/ | ||
COPY --from=nim-build /app/build/liteprotocoltester /usr/bin/ | ||
COPY --from=nim-build /app/apps/liteprotocoltester/run_tester_node.sh /usr/bin/ | ||
|
||
# Copy migration scripts for DB upgrades | ||
COPY --from=nim-build /app/migrations/ /app/migrations/ | ||
ENTRYPOINT ["/usr/bin/run_tester_node.sh", "/usr/bin/liteprotocoltester"] | ||
|
||
ENTRYPOINT ["/usr/bin/liteprotocoltester"] | ||
|
||
# By default just show help if called without arguments | ||
CMD ["--help"] | ||
# # By default just show help if called without arguments | ||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.