forked from blocknetdx/blocknet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-linux
58 lines (48 loc) · 1.91 KB
/
Dockerfile-linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:bionic
ARG cores=8
ENV ecores=$cores
RUN apt update \
&& apt install -y --no-install-recommends \
software-properties-common \
ca-certificates \
wget curl git python vim \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN add-apt-repository ppa:bitcoin/bitcoin \
&& apt update \
&& apt install -y --no-install-recommends \
build-essential libtool autotools-dev bsdmainutils \
libevent-dev autoconf automake pkg-config libssl-dev \
libdb4.8-dev libdb4.8++-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# gcc8
RUN apt update \
&& apt install -y --no-install-recommends \
g++-8-multilib gcc-8-multilib binutils-gold \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV PROJECTDIR=/opt/blocknetdx/blocknet
ENV BASEPREFIX=$PROJECTDIR/depends
ENV DISTDIR=/opt/blocknetdx/dist
ENV HOST=x86_64-pc-linux-gnu
# Download depends
RUN mkdir -p $PROJECTDIR \
&& cd $PROJECTDIR \
&& wget -nv https://s3.us-east-2.amazonaws.com/devbuilds.blocknetprotocol.com/depends/depends-v4.2.0-lin-bionic.tar.gz \
&& [ "$(printf '547e4bdabc132b189cc78d6a12093f4476b6a49dc293b8371f2a046f6c3ecdb9 depends-v4.2.0-lin-bionic.tar.gz' | sha256sum -c)" = "depends-v4.2.0-lin-bionic.tar.gz: OK" ] || $(echo "depends checksum failed"; exit 1)
# Copy source files
COPY . $PROJECTDIR/
# Build source
RUN mkdir -p $DISTDIR \
&& cd $PROJECTDIR \
&& rm -r $BASEPREFIX \
&& tar xzvf depends-v4.2.0-lin-bionic.tar.gz \
&& chmod +x ./autogen.sh; sync \
&& ./autogen.sh \
&& CONFIG_SITE=$BASEPREFIX/$HOST/share/config.site ./configure CC=gcc-8 CXX=g++-8 CFLAGS="-g3 -O0" CXXFLAGS="-g3 -O0" --enable-debug --prefix=/ \
&& make clean \
&& echo "Building with cores: $ecores" \
&& make -j$ecores \
&& make install DESTDIR=$DISTDIR \
&& make clean
WORKDIR /opt/blocknetdx/dist
# Port, RPC, Test Port, Test RPC
EXPOSE 41412 41414 41474 41419