2019-03-22 17:10:53 +01:00
|
|
|
FROM statusteam/nim-base AS build
|
2019-03-22 03:35:01 +02:00
|
|
|
|
2019-03-22 17:10:53 +01:00
|
|
|
RUN apt update \
|
2019-06-19 21:28:54 +03:00
|
|
|
&& apt install -y build-essential make wget \
|
2019-03-22 17:10:53 +01:00
|
|
|
&& apt clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2019-03-22 03:35:01 +02:00
|
|
|
|
2019-06-19 21:28:54 +03:00
|
|
|
RUN export GO_TAR_GZ=go1.12.6.linux-amd64.tar.gz \
|
|
|
|
&& cd /tmp/ \
|
|
|
|
&& wget https://dl.google.com/go/$GO_TAR_GZ \
|
|
|
|
&& tar -xvf $GO_TAR_GZ \
|
|
|
|
&& mv go /usr/local \
|
|
|
|
&& rm $GO_TAR_GZ
|
|
|
|
|
2019-03-23 13:12:22 +02:00
|
|
|
ARG GIT_REVISION
|
|
|
|
|
2019-06-19 21:28:54 +03:00
|
|
|
RUN export GOROOT=/usr/local/go \
|
|
|
|
&& export PATH=$GOROOT/bin:$PATH \
|
|
|
|
&& git clone https://github.com/status-im/nimbus.git \
|
2019-03-22 17:10:53 +01:00
|
|
|
&& cd nimbus \
|
2019-03-23 13:12:22 +02:00
|
|
|
&& git reset --hard ${GIT_REVISION} \
|
2019-06-12 18:49:40 +03:00
|
|
|
&& make update deps vendor/go/bin/p2pd nat-libs \
|
2019-06-20 17:06:35 +03:00
|
|
|
&& cp vendor/go/bin/p2pd /usr/bin/p2pd \
|
2019-06-20 17:43:18 +03:00
|
|
|
&& cat vendor/.nimble/pkgs/*/*
|
2019-03-22 03:35:01 +02:00
|
|
|
|
2019-03-22 17:10:53 +01:00
|
|
|
ARG NETWORK
|
2019-06-20 17:06:35 +03:00
|
|
|
ARG NETWORK_TYPE
|
2019-03-22 03:35:01 +02:00
|
|
|
|
2019-03-22 17:10:53 +01:00
|
|
|
RUN cd nimbus \
|
|
|
|
&& set -a \
|
|
|
|
&& . vendor/nim-beacon-chain/scripts/${NETWORK}.env \
|
|
|
|
&& ./env.sh nim \
|
2019-03-22 03:35:01 +02:00
|
|
|
-o:/usr/bin/beacon_node \
|
|
|
|
-d:release \
|
2019-03-28 22:59:23 +02:00
|
|
|
--debugger:native \
|
|
|
|
--debugInfo \
|
2019-06-20 17:06:35 +03:00
|
|
|
-d:"network_type=${NETWORK_TYPE}" \
|
2019-03-22 17:10:53 +01:00
|
|
|
-d:SHARD_COUNT=${SHARD_COUNT} \
|
|
|
|
-d:SLOTS_PER_EPOCH=${SLOTS_PER_EPOCH} \
|
2019-03-27 17:55:45 +02:00
|
|
|
-d:SECONDS_PER_SLOT=${SECONDS_PER_SLOT} \
|
|
|
|
-d:chronicles_log_level=DEBUG \
|
2019-03-25 02:12:44 +02:00
|
|
|
-d:chronicles_sinks=json \
|
2019-03-22 03:35:01 +02:00
|
|
|
c vendor/nim-beacon-chain/beacon_chain/beacon_node.nim
|
|
|
|
|
2019-03-22 17:10:53 +01:00
|
|
|
# --------------------------------- #
|
|
|
|
# Starting new image to reduce size #
|
|
|
|
# --------------------------------- #
|
|
|
|
FROM debian:9-slim
|
|
|
|
|
|
|
|
RUN apt update \
|
2019-03-23 13:12:22 +02:00
|
|
|
&& apt install -y librocksdb-dev curl \
|
2019-03-22 17:10:53 +01:00
|
|
|
&& apt clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2019-06-12 18:49:40 +03:00
|
|
|
COPY --from=build /usr/bin/beacon_node /usr/bin/beacon_node
|
|
|
|
COPY --from=build /usr/bin/p2pd /usr/bin/p2pd
|
2019-03-22 17:10:53 +01:00
|
|
|
|
|
|
|
MAINTAINER Zahary Karadjov <zahary@status.im>
|
|
|
|
LABEL description="Nimbus installation that can act as an ETH2 network bootstrap node."
|
2019-03-22 03:35:01 +02:00
|
|
|
|
2019-03-22 17:10:53 +01:00
|
|
|
ENTRYPOINT ["/usr/bin/beacon_node"]
|