-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
43 lines (39 loc) · 1.27 KB
/
setup.sh
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
#!/bin/bash
clear
cat <<EOF
--------
You can either download the bitcoinclone prebuilt container from dockerhub
or you can build it from the 'generator' template folder (perhaps you
have made some customisations?).
--------
EOF
echo -n "Would you like to download the 2GB image from the repository?
Y/N: "
read CHOICE
if [ $CHOICE == "Y" ] || [ $CHOICE == "y" ] || [ $CHOICE == "Yes" ] || [ $CHOICE == "yes" ]; then {
docker pull derrend/bitcoinclone
wait
}
else {
cd generator/ && \
docker build -t derrend/bitcoinclone . && \
cd ..
} fi
# Pull the precompiled bitcoinclone container, run it and save the
# result
docker run -it --name seed derrend/bitcoinclone && \
docker commit seed derrend/bitcoinclone:altcoin && \
docker rm seed && \
\
# Move into the deployment_extention directory
cd deployment_extention/ && \
# if you wish to make customisations to your bitcoin.conf, do it now.
\
# Issue a build command to overwrite the existiag clone with some new
# wrapper scripts.
docker build -t derrend/bitcoinclone:altcoin . && \
\
# Spawn two instances of the completed clone to form a two node network.
# You may spawn as many nodes as you wish.
docker run -d --name node_1 derrend/bitcoinclone:altcoin && \
docker run -it --name node_2 derrend/bitcoinclone:altcoin