forked from GolosChain/golos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
165 lines (148 loc) · 4.22 KB
/
Dockerfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
FROM phusion/baseimage:0.9.19
#ARG STEEMD_BLOCKCHAIN=https://example.com/steemd-blockchain.tbz2
ENV LANG=en_US.UTF-8
RUN \
apt-get update && \
apt-get install -y \
autoconf \
automake \
autotools-dev \
bsdmainutils \
build-essential \
cmake \
ccache \
doxygen \
git \
libboost-all-dev \
libreadline-dev \
libssl-dev \
libtool \
ncurses-dev \
pbzip2 \
pkg-config \
python3 \
python3-dev \
python3-pip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
pip3 install gcovr
ADD . /usr/local/src/golos
#RUN \
# cd /usr/local/src/golos && \
# git submodule update --init --recursive && \
# mkdir build && \
# cd build && \
# cmake \
# -DCMAKE_BUILD_TYPE=Release \
# -DBUILD_GOLOS_TESTNET=TRUE \
# -DLOW_MEMORY_NODE=FALSE \
# -DCLEAR_VOTES=TRUE \
# .. && \
# make -j$(nproc) chain_test && \
# ./tests/chain_test && \
# cd /usr/local/src/golos && \
# doxygen && \
# programs/build_helpers/check_reflect.py && \
# rm -rf /usr/local/src/golos/build
#RUN \
# cd /usr/local/src/golos && \
# git submodule update --init --recursive && \
# mkdir build && \
# cd build && \
# cmake \
# -DCMAKE_BUILD_TYPE=Debug \
# -DENABLE_COVERAGE_TESTING=TRUE \
# -DBUILD_GOLOS_TESTNET=TRUE \
# -DLOW_MEMORY_NODE=FALSE \
# -DCLEAR_VOTES=TRUE \
# .. && \
# make -j$(nproc) chain_test && \
# ./tests/chain_test && \
# mkdir -p /var/cobertura && \
# gcovr --object-directory="../" --root=../ --xml-pretty --gcov-exclude=".*tests.*" --gcov-exclude=".*fc.*" --gcov-exclude=".*application*" --gcov-exclude=".*net*" --gcov-exclude=".*plugins*" --gcov-exclude=".*schema*" --gcov-exclude=".*time*" --gcov-exclude=".*utilities*" --gcov-exclude=".*wallet*" --gcov-exclude=".*programs*" --output="/var/cobertura/coverage.xml" && \
# cd /usr/local/src/golos && \
# rm -rf /usr/local/src/golos/build
RUN \
cd /usr/local/src/golos && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_GOLOS_TESTNET=FALSE \
-DBUILD_SHARED_LIBRARIES=FALSE \
-DLOW_MEMORY_NODE=FALSE \
-DCHAINBASE_CHECK_LOCKING=FALSE \
-DCLEAR_VOTES=FALSE \
.. \
&& \
make -j$(nproc) && \
make install && \
rm -rf /usr/local/src/golos
RUN \
apt-get remove -y \
automake \
autotools-dev \
bsdmainutils \
build-essential \
cmake \
doxygen \
dpkg-dev \
git \
libboost-all-dev \
libc6-dev \
libexpat1-dev \
libgcc-5-dev \
libhwloc-dev \
libibverbs-dev \
libicu-dev \
libltdl-dev \
libncurses5-dev \
libnuma-dev \
libopenmpi-dev \
libpython-dev \
libpython2.7-dev \
libreadline-dev \
libreadline6-dev \
libssl-dev \
libstdc++-5-dev \
libtinfo-dev \
libtool \
linux-libc-dev \
m4 \
make \
manpages \
manpages-dev \
mpi-default-dev \
python-dev \
python2.7-dev \
python3-dev \
&& \
apt-get autoremove -y && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/var/cache/* \
/usr/include \
/usr/local/include
RUN useradd -s /bin/bash -m -d /var/lib/golosd golosd
RUN mkdir /var/cache/golosd && \
chown golosd:golosd -R /var/cache/golosd
# add blockchain cache to image
#ADD $STEEMD_BLOCKCHAIN /var/cache/golosd/blocks.tbz2
ENV HOME /var/lib/golosd
RUN chown golosd:golosd -R /var/lib/golosd
ADD programs/golosd/snapshot5392323.json /var/lib/golosd
# rpc service:
EXPOSE 8090
# p2p service:
EXPOSE 2001
RUN mkdir -p /etc/service/golosd
ADD contribution/golosd.sh /etc/service/golosd/run
RUN chmod +x /etc/service/golosd/run
# add seednodes from documentation to image
ADD documentation/seednodes /etc/golosd/seednodes
# the following adds lots of logging info to stdout
ADD contribution/config.ini /etc/golosd/config.ini