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
|
|
|
|
|
|
|
|
RUN git clone --depth 1 https://github.com/status-im/nimbus-eth1.git \
|
|
|
|
&& cd nimbus-eth1 \
|
|
|
|
&& git checkout master \
|
|
|
|
&& make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
|
|
|
|
|
|
|
|
RUN cd nimbus-eth1 && \
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
|
|
|
|
mv build/nimbus /usr/bin/
|
|
|
|
|
|
|
|
# --------------------------------- #
|
|
|
|
# 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/*
|
|
|
|
|
|
|
|
COPY --from=build /usr/bin/nimbus /usr/bin/nimbus
|
2021-09-18 10:37:37 +00:00
|
|
|
RUN usr/bin/nimbus --version > /version.txt
|
2021-03-31 07:22:30 +00:00
|
|
|
|
2021-05-14 07:56:21 +00:00
|
|
|
# Inject the startup script and helper files
|
|
|
|
COPY *.sh *.jq *.json /
|
2021-03-23 11:52:25 +00:00
|
|
|
RUN chmod +x /nimbus.sh
|
2021-05-19 09:36:43 +00:00
|
|
|
RUN chmod +x /enode.sh
|
2021-03-23 11:52:25 +00:00
|
|
|
|
|
|
|
# Export the usual networking ports to allow outside access to the node
|
|
|
|
EXPOSE 8545 8546 8547 30303 30303/udp
|
|
|
|
|
|
|
|
ENTRYPOINT ["/nimbus.sh"]
|