2024-10-15 09:37:54 +00:00
|
|
|
# Nimbus
|
|
|
|
# Copyright (c) 2024 Status Research & Development GmbH
|
|
|
|
# Licensed and distributed under either of
|
|
|
|
# * MIT license (license terms in the root directory or at
|
|
|
|
# https://opensource.org/licenses/MIT).
|
|
|
|
# * Apache v2 license (license terms in the root directory or at
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0).
|
|
|
|
# at your option. This file may not be copied, modified, or distributed
|
|
|
|
# except according to those terms.
|
|
|
|
|
|
|
|
|
2021-03-23 11:52:25 +00:00
|
|
|
# Docker container spec for building the master branch of nimbus.
|
|
|
|
|
|
|
|
FROM debian:buster-slim AS build
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --fix-missing build-essential make git libpcre3-dev librocksdb-dev \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
ENV NPROC=2
|
|
|
|
|
2022-04-13 11:39:29 +00:00
|
|
|
RUN git clone --depth 1 --branch non_blocking_startup https://github.com/status-im/nimbus-eth1.git \
|
2021-03-23 11:52:25 +00:00
|
|
|
&& cd nimbus-eth1 \
|
2022-04-13 11:39:29 +00:00
|
|
|
&& git checkout non_blocking_startup \
|
2021-03-23 11:52:25 +00:00
|
|
|
&& make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
|
|
|
|
|
|
|
|
RUN cd nimbus-eth1 && \
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
|
2024-10-15 09:37:54 +00:00
|
|
|
mv build/nimbus_execution_client /usr/bin/
|
2021-03-23 11:52:25 +00:00
|
|
|
|
|
|
|
# --------------------------------- #
|
|
|
|
# Starting new image to reduce size #
|
|
|
|
# --------------------------------- #
|
|
|
|
FROM debian:buster-slim AS deploy
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y librocksdb-dev bash curl jq\
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2024-10-15 09:37:54 +00:00
|
|
|
COPY --from=build /usr/bin/nimbus_execution_client /usr/bin/nimbus_execution_client
|
|
|
|
RUN usr/bin/nimbus_execution_client --version > /version.txt
|
2021-03-31 07:22:30 +00:00
|
|
|
|
2022-04-13 11:39:29 +00:00
|
|
|
# Add genesis mapper script.
|
|
|
|
ADD genesis.json /genesis.json
|
|
|
|
ADD mapper.jq /mapper.jq
|
|
|
|
|
|
|
|
# Add the startup script.
|
|
|
|
ADD nimbus.sh /nimbus.sh
|
2021-03-23 11:52:25 +00:00
|
|
|
RUN chmod +x /nimbus.sh
|
2022-04-13 11:39:29 +00:00
|
|
|
|
|
|
|
# Add the enode URL retriever script.
|
|
|
|
ADD enode.sh /hive-bin/enode.sh
|
|
|
|
RUN chmod +x /hive-bin/enode.sh
|
2021-03-23 11:52:25 +00:00
|
|
|
|
|
|
|
# Export the usual networking ports to allow outside access to the node
|
2022-04-13 11:39:29 +00:00
|
|
|
EXPOSE 8545 8546 8547 8551 30303 30303/udp
|
2021-03-23 11:52:25 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/nimbus.sh"]
|