Add waku node Dockerfile [skip ci]

This commit is contained in:
kdeme 2020-01-09 16:43:33 +01:00 committed by zah
parent 9bd99d88b8
commit d15286032d
2 changed files with 52 additions and 0 deletions

36
waku/docker/Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM debian:bullseye-slim AS build
SHELL ["/bin/bash", "-c"]
RUN apt-get -qq update \
&& apt-get -qq -y install build-essential make wget librocksdb-dev libpcre3-dev git &>/dev/null \
&& apt-get -qq clean
ARG GIT_REVISION
RUN cd /root \
&& git clone https://github.com/status-im/nimbus.git \
&& cd nimbus \
&& git reset --hard ${GIT_REVISION} \
&& { make &>/dev/null || true; } \
&& make -j$(nproc) update \
&& make NIMFLAGS="-d:debug -d:insecure" wakunode
# --------------------------------- #
# Starting new image to reduce size #
# --------------------------------- #
FROM debian:bullseye-slim
SHELL ["/bin/bash", "-c"]
RUN apt-get -qq update \
&& apt-get -qq -y install librocksdb-dev libpcre3 &>/dev/null \
&& apt-get -qq clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /root/nimbus/build/wakunode /usr/bin/wakunode
MAINTAINER Kim De Mey <kimdemey@status.im>
LABEL description="Wakunode: Waku and Whisper client"
ENTRYPOINT ["/usr/bin/wakunode"]

16
waku/docker/Makefile Normal file
View File

@ -0,0 +1,16 @@
SHELL := bash # the shell used internally by "make"
# These default settings can be overriden by exporting env variables
GIT_REVISION ?= $(shell git rev-parse HEAD)
IMAGE_TAG ?= waku_latest
IMAGE_NAME ?= statusteam/nimbus_waku_node:$(IMAGE_TAG)
build:
docker build \
--build-arg="GIT_REVISION=$(GIT_REVISION)" \
-t $(IMAGE_NAME) .
push: build
docker push $(IMAGE_NAME)