forked from bitshares/bitshares-core
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
65 lines (57 loc) · 1.48 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
FROM phusion/baseimage:0.9.19
MAINTAINER The bitshares decentralized organisation
ENV LANG=en_US.UTF-8
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 \
&& \
apt-get update -y && \
apt-get install -y fish && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD . /bitshares-core
WORKDIR /bitshares-core
# Compile
RUN \
git submodule sync --recursive && \
git submodule update --init --recursive && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
. && \
make witness_node && \
make install && \
#
# Obtain version
mkdir /etc/bitshares && \
git rev-parse --short HEAD > /etc/bitshares/version && \
cd / && \
rm -rf /bitshares-core
# Home directory $HOME
WORKDIR /
RUN useradd -s /bin/bash -m -d /var/lib/bitshares bitshares
ENV HOME /var/lib/bitshares
RUN chown bitshares:bitshares -R /var/lib/bitshares
# Volume
VOLUME ["/var/lib/bitshares", "/etc/bitshares"]
# rpc service:
EXPOSE 8090
# p2p service:
EXPOSE 2001
# default exec/config files
ADD docker/default_config.ini /etc/bitshares/config.ini
ADD docker/bitsharesentry.sh /usr/local/bin/bitsharesentry.sh
RUN chmod a+x /usr/local/bin/bitsharesentry.sh
# default execute entry
CMD /usr/local/bin/bitsharesentry.sh