mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 22:13:07 +00:00
* fix heaptrack build for Nim v2.0.12 builds, fixed docker image creation and local image with copying * fix Dockerfile.bn.amd64 to support nwaku-compose * Fix heaptrack image build with jenkins.release * Fix NIM_COMMIT for heaptrack support in jenkins.release * Remove leftover echo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix dockerfile naming * Fix assignment of NIM_COMMIT in Makefile --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
64 lines
1.9 KiB
Docker
64 lines
1.9 KiB
Docker
# Dockerfile to build a distributable container image from pre-existing binaries
|
|
# FROM debian:stable-slim AS prod
|
|
FROM ubuntu:24.04 AS prod
|
|
|
|
ARG MAKE_TARGET=wakunode2
|
|
|
|
LABEL maintainer="vaclav@status.im"
|
|
LABEL source="https://github.com/waku-org/nwaku"
|
|
LABEL description="Wakunode: Waku client"
|
|
LABEL commit="unknown"
|
|
|
|
# DevP2P, LibP2P, and JSON RPC ports
|
|
EXPOSE 30303 60000 8545
|
|
|
|
# Referenced in the binary
|
|
RUN apt-get update &&\
|
|
apt-get install -y libpcre3 libpq-dev curl iproute2 wget jq 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/
|
|
|
|
# Copy migration scripts for DB upgrades
|
|
ADD ./migrations/ /app/migrations/
|
|
|
|
# Symlink the correct wakunode binary
|
|
RUN ln -sv /usr/local/bin/$MAKE_TARGET /usr/bin/wakunode
|
|
|
|
ENTRYPOINT ["/usr/bin/wakunode"]
|
|
|
|
# By default just show help if called without arguments
|
|
CMD ["--help"]
|
|
|
|
# Build debug tools: heaptrack
|
|
FROM ubuntu:24.04 AS heaptrack-build
|
|
|
|
RUN apt update
|
|
RUN apt install -y gdb git g++ make cmake zlib1g-dev libboost-all-dev libunwind-dev
|
|
RUN git clone https://github.com/KDE/heaptrack.git /heaptrack
|
|
|
|
WORKDIR /heaptrack/build
|
|
# going to a commit that builds properly. We will revisit this for new releases
|
|
RUN git reset --hard f9cc35ebbdde92a292fe3870fe011ad2874da0ca
|
|
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
RUN make -j$(nproc)
|
|
|
|
|
|
# Debug image
|
|
FROM prod AS debug-with-heaptrack
|
|
|
|
RUN apt update
|
|
RUN apt install -y gdb libunwind8
|
|
|
|
# Add heaptrack
|
|
COPY --from=heaptrack-build /heaptrack/build/ /heaptrack/build/
|
|
|
|
ENV LD_LIBRARY_PATH=/heaptrack/build/lib/heaptrack/
|
|
RUN ln -s /heaptrack/build/bin/heaptrack /usr/local/bin/heaptrack
|
|
|
|
ENTRYPOINT ["/heaptrack/build/bin/heaptrack", "/usr/bin/wakunode"]
|