Update Hush Docker environment scripts
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,5 +1,6 @@
|
|||||||
|
# Copyright (c) 2019-2020 Hush developers
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
MAINTAINER Mihail Fedorov <kolo@komodoplatform.com>
|
MAINTAINER Duke Leto <duke@leto.net>
|
||||||
|
|
||||||
RUN apt-get -y update && \
|
RUN apt-get -y update && \
|
||||||
apt-get -y upgrade && \
|
apt-get -y upgrade && \
|
||||||
@@ -17,13 +18,14 @@ WORKDIR /hush
|
|||||||
RUN cd /hush && \
|
RUN cd /hush && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
./configure --with-incompatible-bdb --with-gui || true && \
|
./configure --with-incompatible-bdb --with-gui || true && \
|
||||||
./zcutil/build.sh -j$(nproc)
|
./build.sh -j$(nproc)
|
||||||
|
|
||||||
# Unknown stuff goes here
|
|
||||||
|
|
||||||
RUN ln -sf /hush/src/komodod /usr/bin/komodod && \
|
RUN ln -sf /hush/src/komodod /usr/bin/komodod && \
|
||||||
ln -sf /hush/src/hushd /usr/bin/hushd && \
|
ln -sf /hush/src/hushd /usr/bin/hushd && \
|
||||||
|
ln -sf /hush/src/hush-tx /usr/bin/hush-tx && \
|
||||||
|
ln -sf /hush/src/wallet-utility /usr/bin/hush-wallet-utility && \
|
||||||
|
ln -sf /hush/src/hush-smart-chain /usr/bin/hush-smart-chain && \
|
||||||
ln -sf /hush/zcutil/docker-entrypoint.sh /usr/bin/entrypoint && \
|
ln -sf /hush/zcutil/docker-entrypoint.sh /usr/bin/entrypoint && \
|
||||||
ln -sf /hush/zcutil/docker-komodo-cli.sh /usr/bin/hush-cli
|
ln -sf /hush/zcutil/docker-hush-cli.sh /usr/bin/hush-cli
|
||||||
|
|
||||||
CMD ["entrypoint"]
|
CMD ["entrypoint"]
|
||||||
|
|||||||
@@ -1,47 +1,36 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2019-2020 Hush developers
|
||||||
|
|
||||||
#set -ex
|
#set -ex
|
||||||
|
echo "...Checking HUSH3.conf"
|
||||||
|
|
||||||
echo "...Checking komodo.conf"
|
if [ ! -e "$HOME/.komodo/HUSH3/HUSH3.conf" ]; then
|
||||||
|
mkdir -p $HOME/.komodo/HUSH3
|
||||||
|
|
||||||
if [ ! -e "$HOME/.komodo/komodo.conf" ]; then
|
echo "...Creating HUSH3.conf"
|
||||||
mkdir -p $HOME/.komodo
|
cat <<EOF > $HOME/.komodo/HUSH3.conf
|
||||||
|
rpcuser=hush
|
||||||
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`}
|
rpcpassword=${rpcpassword:-`dd if=/dev/urandom bs=33 count=1 2>/dev/null | base64`}
|
||||||
txindex=1
|
txindex=1
|
||||||
bind=${listenip:-127.0.0.1}
|
bind=${listenip:-127.0.0.1}
|
||||||
rpcbind=${listenip:-127.0.0.1}
|
rpcbind=${listenip:-127.0.0.1}
|
||||||
|
# Some knobs you might want to turn
|
||||||
|
debug=0
|
||||||
|
zdebug=0
|
||||||
|
zindex=0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat $HOME/.komodo/komodo.conf
|
cat $HOME/.komodo/HUSH3/HUSH3.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "...Checking fetch-params"
|
|
||||||
$HOME/zcutil/fetch-params.sh
|
|
||||||
echo "Initialization completed successfully"
|
|
||||||
echo
|
|
||||||
|
|
||||||
# ToDo: Needs some rework. I was sick
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
|
|
||||||
args=("$@")
|
args=("$@")
|
||||||
|
|
||||||
elif [ -z ${assetchain+x} ]; then
|
elif [ -z ${assetchain+x} ]; then
|
||||||
|
|
||||||
args=("-gen -genproclimit=${genproclimit:-2} -pubkey=${pubkey}")
|
args=("-gen -genproclimit=${genproclimit:-2} -pubkey=${pubkey}")
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
args=("-pubkey=${pubkey} -ac_name=${assetchain} -addnode=${seednode}")
|
args=("-pubkey=${pubkey} -ac_name=${assetchain} -addnode=${seednode}")
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo "Running: hushd ${args[@]}"
|
||||||
echo "****************************************************"
|
|
||||||
echo "Running: komodod ${args[@]}"
|
|
||||||
echo "****************************************************"
|
|
||||||
|
|
||||||
exec komodod ${args[@]}
|
exec hushd ${args[@]}
|
||||||
|
|||||||
4
zcutil/docker-hush-cli.sh
Executable file
4
zcutil/docker-hush-cli.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2019-2020 Hush developers
|
||||||
|
|
||||||
|
/hush/src/hush-cli $@
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# ToDo: check for docker arg ac_name
|
|
||||||
|
|
||||||
/komodo/src/komodo-cli $1 $2 $3 $4
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user