2021-02-14 09:34:31 +00:00
|
|
|
FROM debian:buster-slim AS build
|
2019-03-23 11:12:22 +00:00
|
|
|
|
2021-02-14 09:34:31 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --fix-missing build-essential make git libpcre3-dev librocksdb-dev \
|
|
|
|
&& apt-get clean \
|
2019-03-23 11:12:22 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2019-03-22 01:35:01 +00:00
|
|
|
|
2019-03-23 11:12:22 +00:00
|
|
|
ARG GIT_REVISION
|
2021-02-14 09:34:31 +00:00
|
|
|
ENV NPROC=2
|
2019-03-22 01:35:01 +00:00
|
|
|
|
2021-02-14 09:34:31 +00:00
|
|
|
RUN git clone https://github.com/status-im/nimbus-eth1.git \
|
|
|
|
&& cd nimbus-eth1 \
|
2019-03-23 11:12:22 +00:00
|
|
|
&& git reset --hard ${GIT_REVISION} \
|
2021-02-14 09:34:31 +00:00
|
|
|
&& make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
|
2019-03-22 01:35:01 +00:00
|
|
|
|
2021-02-14 09:34:31 +00:00
|
|
|
RUN cd nimbus-eth1 && \
|
|
|
|
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
|
2019-03-22 01:35:01 +00:00
|
|
|
mv build/nimbus /usr/bin/
|
|
|
|
|
2019-03-23 11:12:22 +00:00
|
|
|
# --------------------------------- #
|
|
|
|
# Starting new image to reduce size #
|
|
|
|
# --------------------------------- #
|
2021-02-14 09:34:31 +00:00
|
|
|
FROM debian:buster-slim AS deploy
|
2019-03-23 11:12:22 +00:00
|
|
|
|
2021-02-14 09:34:31 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y librocksdb-dev \
|
|
|
|
&& apt-get clean \
|
2019-03-23 11:12:22 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
COPY --from=build /usr/bin/nimbus /usr/bin/nimbus
|
|
|
|
|
|
|
|
MAINTAINER Zahary Karadjov <zahary@status.im>
|
|
|
|
LABEL description="Nimbus: an Ethereum 2.0 Sharding Client for Resource-Restricted Devices"
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/nimbus"]
|