first step into hive integration, fixes Dockerfile

This commit is contained in:
jangko 2021-02-14 16:34:31 +07:00 committed by andri lim
parent a836c122ed
commit 455756c098
1 changed files with 14 additions and 14 deletions

View File

@ -1,29 +1,30 @@
FROM statusteam/nim-base AS build FROM debian:buster-slim AS build
RUN apt update \ RUN apt-get update \
&& apt install -y build-essential make \ && apt-get install -y --fix-missing build-essential make git libpcre3-dev librocksdb-dev \
&& apt clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG GIT_REVISION ARG GIT_REVISION
ENV NPROC=2
RUN git clone https://github.com/status-im/nimbus.git \ RUN git clone https://github.com/status-im/nimbus-eth1.git \
&& cd nimbus \ && cd nimbus-eth1 \
&& git reset --hard ${GIT_REVISION} \ && git reset --hard ${GIT_REVISION} \
&& make update deps && make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
RUN cd nimbus && \ RUN cd nimbus-eth1 && \
make nimbus && \ make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
mv build/nimbus /usr/bin/ mv build/nimbus /usr/bin/
# --------------------------------- # # --------------------------------- #
# Starting new image to reduce size # # Starting new image to reduce size #
# --------------------------------- # # --------------------------------- #
FROM debian:9-slim FROM debian:buster-slim AS deploy
RUN apt update \ RUN apt-get update \
&& apt install -y librocksdb-dev \ && apt-get install -y librocksdb-dev \
&& apt clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /usr/bin/nimbus /usr/bin/nimbus COPY --from=build /usr/bin/nimbus /usr/bin/nimbus
@ -32,4 +33,3 @@ MAINTAINER Zahary Karadjov <zahary@status.im>
LABEL description="Nimbus: an Ethereum 2.0 Sharding Client for Resource-Restricted Devices" LABEL description="Nimbus: an Ethereum 2.0 Sharding Client for Resource-Restricted Devices"
ENTRYPOINT ["/usr/bin/nimbus"] ENTRYPOINT ["/usr/bin/nimbus"]