forked from btccom/btcpool-ABANDONED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (51 loc) · 1.56 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
#
# Dockerfile
#
# @author [email protected], [email protected]
# @copyright btc.com
# @since 2016-08-01
#
#
FROM phusion/baseimage:0.9.22
MAINTAINER YihaoPeng <[email protected]>
ENV HOME /root
ENV TERM xterm
CMD ["/sbin/my_init"]
# use aliyun source
#ADD sources-aliyun.com.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils yasm
RUN apt-get install -y libboost-all-dev libzmq3-dev curl wget
# build bitcoind
RUN mkdir ~/source
RUN cd ~/source && wget https://github.com/Bitcoin-ABC/bitcoin-abc/archive/v0.16.1.tar.gz
RUN cd ~/source \
&& tar zxf v0.16.1.tar.gz && cd bitcoin-abc-0.16.1 \
&& ./autogen.sh \
&& ./configure --disable-wallet --disable-tests \
&& make && make install
#&& make -j$(nproc) && make install
# mkdir bitcoind data dir
RUN mkdir -p /root/.bitcoin
RUN mkdir -p /root/scripts
# scripts
ADD opsgenie-monitor-bitcoind.sh /root/scripts/opsgenie-monitor-bitcoind.sh
# crontab shell
ADD crontab.txt /etc/cron.d/bitcoind
# logrotate
ADD logrotate-bitcoind /etc/logrotate.d/bitcoind
#
# services
#
# service for mainnet
RUN mkdir /etc/service/bitcoind
ADD run /etc/service/bitcoind/run
RUN chmod +x /etc/service/bitcoind/run
#service for testnet
#RUN mkdir /etc/service/bitcoind_testnet
#ADD run_testnet /etc/service/bitcoind_testnet/run
#RUN chmod +x /etc/service/bitcoind_testnet/run
# remove source & build files
RUN rm -rf ~/source
# clean
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*