Skip to content

Commit

Permalink
clients/nimbus: clean Dockerfile, accept branch arg (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz authored Feb 7, 2023
1 parent 33224ab commit 2de942f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
14 changes: 8 additions & 6 deletions clients/nimbus-bn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@

FROM debian:buster-slim AS build

ARG branch=unstable

RUN apt-get update \
&& apt-get install -y --fix-missing build-essential make git libpcre3-dev librocksdb-dev curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV NPROC=2
RUN git clone --recurse-submodules --depth 1 --branch "${branch}" \
https://github.com/status-im/nimbus-eth2.git

WORKDIR /nimbus-eth2

RUN git clone --depth 1 --branch unstable https://github.com/status-im/nimbus-eth2.git \
&& cd nimbus-eth2 \
&& make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
RUN NPROC=$(nproc); make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update

RUN cd nimbus-eth2 && \
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus_beacon_node && \
RUN NPROC=$(nproc); make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus_beacon_node && \
mv build/nimbus_beacon_node /usr/bin/

# --------------------------------- #
Expand Down
15 changes: 8 additions & 7 deletions clients/nimbus-el/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

FROM debian:buster-slim AS build

ARG branch=master

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 --recurse-submodules --depth 1 --branch "${branch}" \
https://github.com/status-im/nimbus-eth1.git

WORKDIR /nimbus-eth1

RUN git clone --depth 1 --branch master https://github.com/status-im/nimbus-eth1.git \
&& cd nimbus-eth1 \
&& git checkout master \
&& make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
RUN NPROC=$(nproc); make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update

RUN cd nimbus-eth1 && \
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
RUN NPROC=$(nproc); make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus && \
mv build/nimbus /usr/bin/

# --------------------------------- #
Expand Down
14 changes: 8 additions & 6 deletions clients/nimbus-vc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@

FROM debian:buster-slim AS build

ARG branch=unstable

RUN apt-get update \
&& apt-get install -y --fix-missing build-essential make git libpcre3-dev librocksdb-dev curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV NPROC=2
RUN git clone --recurse-submodules --depth 1 --branch "${branch}" \
https://github.com/status-im/nimbus-eth2.git

WORKDIR /nimbus-eth2

RUN git clone --depth 1 --branch unstable https://github.com/status-im/nimbus-eth2.git \
&& cd nimbus-eth2 \
&& make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update
RUN NPROC=$(nproc); make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" V=1 update

RUN cd nimbus-eth2 && \
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus_validator_client && \
RUN NPROC=$(nproc); make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" nimbus_validator_client && \
mv build/nimbus_validator_client /usr/bin/

# --------------------------------- #
Expand Down

0 comments on commit 2de942f

Please sign in to comment.