forked from GravityProtocol/gravity-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (57 loc) · 1.53 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
FROM phusion/baseimage:0.9.19
MAINTAINER gravityprotocol
ENV LANG=en_US.UTF-8
ADD . /gravity-core
WORKDIR /gravity-core
RUN \
apt-get update -y && \
apt-get install -y \
g++ \
autoconf \
cmake \
git \
libbz2-dev \
libreadline-dev \
libboost-all-dev \
libcurl4-openssl-dev \
libssl-dev \
libncurses-dev \
doxygen \
libcurl4-openssl-dev \
fish && \
#
# Obtain version
echo && echo '------ Obtain version ------' && \
mkdir -v /etc/gravity /var/lib/gravity && \
git submodule update --init --recursive && \
git rev-parse --short HEAD > /etc/gravity/version && \
#
# Default exec/config files
echo && echo '------ Default exec/config files ------' && \
cp -fv docker/default_config.ini /etc/gravity/config.ini && \
cp -fv docker/gravityentry.sh /usr/local/bin/gravityentry.sh && \
chmod -v a+x /usr/local/bin/gravityentry.sh && \
#
# Compile
echo && echo '------ Compile ------' && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
. && \
make witness_node cli_wallet && \
make install && \
cd / && \
rm -rf /gravity-core && \
apt-get autoremove -y --purge g++ gcc autoconf cmake libboost-all-dev doxygen && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Home directory $HOME
WORKDIR /
ENV HOME /var/lib/gravity
# Volume
VOLUME ["/var/lib/gravity"]
# rpc service:
EXPOSE 8090
# p2p service:
EXPOSE 9090
# default execute entry
CMD /usr/local/bin/gravityentry.sh