mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2026-01-09 02:08:03 -05:00
25 lines
536 B
Docker
25 lines
536 B
Docker
# Create the build image
|
|
FROM nimlang/nim:2.2.4-alpine-regular AS build
|
|
|
|
WORKDIR /node
|
|
|
|
COPY libp2p.nimble config.nims ./
|
|
RUN git config --global http.sslVerify false
|
|
RUN nimble install -y
|
|
|
|
COPY . .
|
|
RUN nimble c -d:chronicles_colors=None --threads:on -d:metrics -d:libp2p_network_protocols_metrics -d:release performance/main.nim
|
|
|
|
|
|
FROM nimlang/nim:2.2.4-alpine-slim
|
|
|
|
WORKDIR /node
|
|
|
|
COPY --from=build /node/performance/main /node/main
|
|
|
|
RUN chmod +x main \
|
|
&& apk add --no-cache curl iproute2
|
|
|
|
VOLUME ["/output"]
|
|
|
|
ENTRYPOINT ["./main"] |