forked from SuperNETorg/komodo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM ubuntu:16.04 | ||
MAINTAINER Mihail Fedorov <[email protected]> | ||
|
||
# All the stuff | ||
# And clean out packages, keep space minimal | ||
RUN apt-get -y update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ | ||
unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ | ||
protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
ADD ./ /komodo | ||
ENV HOME /komodo | ||
WORKDIR /komodo | ||
|
||
# configure || true or it WILL halt | ||
RUN cd /komodo && \ | ||
./autogen.sh && \ | ||
./configure --with-incompatible-bdb --with-gui || true && \ | ||
./zcutil/build.sh -j4 | ||
|
||
# Unknown stuff goes here | ||
|
||
RUN ln -sf /komodo/src/komodod /usr/bin/komodod && \ | ||
ln -sf /komodo/zcutil/docker-entrypoint.sh /usr/bin/entrypoint && \ | ||
ln -sf /komodo/zcutil/docker-komodo-cli.sh /usr/bin/komodo-cli | ||
|
||
CMD ["entrypoint"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
#set -ex | ||
|
||
echo "...Checking komodo.conf" | ||
|
||
if [ ! -e "$HOME/.komodo/komodo.conf" ]; then | ||
mkdir -p $HOME/.komodo | ||
|
||
echo "...Creating komodo.conf" | ||
cat <<EOF > $HOME/.komodo/komodo.conf | ||
rpcuser=${rpcuser:-komodorpc} | ||
rpcpassword=${rpcpassword:-`dd if=/dev/urandom bs=33 count=1 2>/dev/null | base64`} | ||
txindex=1 | ||
bind=${listenip:-127.0.0.1} | ||
rpcbind=${listenip:-127.0.0.1} | ||
addnode=5.9.102.210 | ||
addnode=78.47.196.146 | ||
addnode=178.63.69.164 | ||
addnode=88.198.65.74 | ||
addnode=5.9.122.241 | ||
addnode=144.76.94.38 | ||
EOF | ||
|
||
cat $HOME/.komodo/komodo.conf | ||
fi | ||
|
||
echo "...Checking fetch-params" | ||
$HOME/zcutil/fetch-params.sh | ||
|
||
echo "Initialization completed successfully" | ||
echo | ||
if [ $# -gt 0 ]; then | ||
|
||
args=("$@") | ||
|
||
elif [ -z ${assetchain+x} ]; then | ||
|
||
args=("-gen -genproclimit=${genproclimit:-2} -pubkey=${pubkey}") | ||
|
||
else | ||
|
||
args=("-pubkey=${pubkey} -ac_name=${assetchain} -addnode=${seednode}") | ||
|
||
fi | ||
|
||
echo | ||
echo "****************************************************" | ||
echo "Running: komodod ${args[@]}" | ||
echo "****************************************************" | ||
|
||
exec komodod ${args[@]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
if [ -z ${assetchain+x} ]; then | ||
|
||
/komodo/src/komodo-cli $1 $2 $3 $4 | ||
|
||
else | ||
|
||
/komodo/src/komodo-cli -ac_name=$assetchain $1 $2 $3 $4 | ||
|
||
fi | ||
|