Docker builds for beacon_node and nimbus

This commit is contained in:
Zahary Karadjov 2019-03-22 03:35:01 +02:00 committed by zah
parent 8089b1a574
commit 46aca468bb
4 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,26 @@
FROM statusteam/nim-base
MAINTAINER Zahary Karadjov <zahary@status.im>
ARG network
ARG network_backend
RUN apt-get update && apt-get install -y build-essential make librocksdb-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN git clone https://github.com/status-im/nimbus.git && \
cd nimbus && \
make update deps
RUN cd nimbus && \
set -a && \
. vendor/nim-beacon-chain/scripts/${network}.env && \
./env.sh nim \
-o:/usr/bin/beacon_node \
-d:release \
-d:with$network_backend \
-d:SHARD_COUNT=$SHARD_COUNT \
-d:SLOTS_PER_EPOCH=$SLOTS_PER_EPOCH \
c vendor/nim-beacon-chain/beacon_chain/beacon_node.nim
ENTRYPOINT ["beacon_node"]

22
docker/build_beacon_node.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -euv
buildAndPush() {
NETWORK=$1
BACKEND=$2
CONTAINER_NAME=statusteam/beacon_node_${NETWORK}_${BACKEND}
docker build -t $CONTAINER_NAME beacon_node \
--build-arg network=$NETWORK \
--build-arg network_backend=$BACKEND
docker push $CONTAINER_NAME
}
buildAndPush testnet0 rlpx
buildAndPush testnet1 rlpx
buildAndPush testnet0 libp2p
buildAndPush testnet1 libp2p

9
docker/build_nimbus.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -euv
CONTAINER_NAME=statusteam/nimbus
docker build -t $CONTAINER_NAME nimbus
docker push $CONTAINER_NAME

16
docker/nimbus/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM statusteam/nim-base
MAINTAINER Zahary Karadjov <zahary@status.im>
RUN apt-get update && apt-get install -y build-essential make librocksdb-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN git clone https://github.com/status-im/nimbus.git && \
cd nimbus && \
make update deps
RUN cd nimbus && \
make nimbus && \
mv build/nimbus /usr/bin/
ENTRYPOINT ["nimbus"]