forked from dArkjON/BTDX-Masternode-Setup-Ubuntu-1404
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
134 lines (117 loc) · 3.93 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
# Bitcloud (BTDX) Masternode - Dockerfile (05-2018)
#
# The Dockerfile will install all required stuff to run a Bitcloud (BTDX) Masternode and is based on script btdxsetup.sh (see: https://github.com/dArkjON/BTDX-Masternode-Setup-Ubuntu-1404/blob/master/btdxsetup.sh)
# Bitcloud Repo : https://github.com/LIMXTEC/Bitcloud
# E-Mail: info@bit-cloud.info
#
# To build a docker image for btdx-masternode from the Dockerfile the bitcloud.conf is also needed.
# See BUILD_README.md for further steps.
# Use an official Ubuntu runtime as a parent image
FROM ubuntu:16.04
LABEL maintainer="Jon D. (dArkjON), David B. (dalijolijo)"
ARG VERSION=2.1.0.0
ENV VERSION=${VERSION}
RUN echo $VERSION
ARG RELEASE_TAR=linux.Ubuntu.16.04.LTS-static-libstdc.tar.gz
ENV RELEASE_TAR=${RELEASE_TAR}
RUN echo $RELEASE_TAR
# Make ports available to the world outside this container
# DefaultPort = 8329
# RPCPort = 8330
# TorPort = 9050 (see https://github.com/LIMXTEC/Bitcloud/blob/master/doc/tor.md)
USER root
# Change sh to bash
SHELL ["/bin/bash", "-c"]
# Define environment variable
ENV BTDXPWD "bitcloud"
RUN echo '*** Bitcloud (BTDX) Masternode ***'
#
# Creating bitcloud user
#
RUN echo '*** Creating bitcloud user ***' && \
adduser --disabled-password --gecos "" bitcloud && \
usermod -a -G sudo,bitcloud bitcloud && \
echo bitcloud:$BTDXPWD | chpasswd
#
# Running updates and installing required packages
#
# nodejs nodejs-legacy redis-server npm
RUN echo '*** Running updates and installing required packages ***' && \
apt-get update -y && \
apt-get dist-upgrade -y && \
apt-get install -y apt-utils \
autoconf \
automake \
autotools-dev \
build-essential \
curl \
git \
libboost-all-dev \
libevent-dev \
libminiupnpc-dev \
libssl-dev \
libtool \
libzmq5-dev \
pkg-config \
software-properties-common \
sudo \
supervisor \
vim \
wget && \
add-apt-repository -y ppa:bitcoin/bitcoin && \
apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y libdb4.8-dev \
libdb4.8++-dev
#
# Cloning and Compiling Bitcloud Wallet
#
#RUN echo '*** Cloning and Compiling Bitcloud Wallet ***' && \
# cd && \
# echo "Execute a git clone of LIMXTEC/Bitcloud. Please wait..." && \
# git clone https://github.com/LIMXTEC/Bitcloud.git && \
# cd Bitcloud && \
# ./autogen.sh && \
# ./configure --disable-dependency-tracking --enable-tests=no --without-gui && \
# make && \
# cd && \
# cd Bitcloud/src && \
# strip bitcloudd && \
# cp bitcloudd /usr/local/bin && \
# strip bitcloud-cli && \
# cp bitcloud-cli /usr/local/bin && \
# strip bitcloud-tx && \
# cp bitcloud-tx /usr/local/bin && \
# chmod 775 /usr/local/bin/bitcloud* && \
# cd && \
# rm -rf Bitcloud
#
# Download Bitcloud release
#
RUN echo '*** Download Bitcloud release ***' && \
mkdir -p /root/src && \
cd /root/src && \
wget https://github.com/LIMXTEC/Bitcloud/releases/download/${VERSION}/${RELEASE_TAR} && \
tar xzf *.tar.gz && \
chmod 775 bitcloud* && \
cp bitcloud* /usr/local/bin && \
rm *.tar.gz
#
# Copy Supervisor Configuration and bitcloud.conf
#
RUN echo '*** Copy Supervisor Configuration and bitcloud.conf ***'
COPY *.sv.conf /etc/supervisor/conf.d/
COPY bitcloud.conf /tmp
#
# Logging outside docker container
#
VOLUME /var/log
#
# Start script
#
RUN echo '*** Copy start script ***'
COPY start.sh /usr/local/bin/start.sh
RUN rm -f /var/log/access.log && mkfifo -m 0666 /var/log/access.log && \
chmod 755 /usr/local/bin/*
ENV TERM linux
CMD ["/usr/local/bin/start.sh"]