mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2026-01-09 14:28:11 -05:00
20 lines
866 B
Docker
20 lines
866 B
Docker
# syntax=docker/dockerfile:1.5-labs
|
|
FROM nimlang/nim:latest as builder
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY .pinned libp2p.nimble nim-libp2p/
|
|
|
|
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y libssl-dev
|
|
|
|
RUN cd nim-libp2p && nimble install_pinned && nimble install redis -y
|
|
|
|
COPY . nim-libp2p/
|
|
|
|
RUN cd nim-libp2p && nim c --skipParentCfg --NimblePath:./nimbledeps/pkgs2 --mm:refc -d:chronicles_log_level=DEBUG -d:chronicles_default_output_device=stderr -d:release --threads:off --skipProjCfg -o:hole-punching-tests ./interop/hole-punching/hole_punching.nim
|
|
|
|
FROM --platform=linux/amd64 debian:bullseye-slim
|
|
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y dnsutils jq curl tcpdump iproute2 libssl-dev
|
|
COPY --from=builder /workspace/nim-libp2p/hole-punching-tests /usr/bin/hole-punch-client
|
|
ENV RUST_BACKTRACE=1
|