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
|
||||
MAINTAINER Mihail Fedorov <kolo@komodoplatform.com>
|
||||
MAINTAINER Duke Leto <duke@leto.net>
|
||||
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y upgrade && \
|
||||
@@ -17,13 +18,14 @@ WORKDIR /hush
|
||||
RUN cd /hush && \
|
||||
./autogen.sh && \
|
||||
./configure --with-incompatible-bdb --with-gui || true && \
|
||||
./zcutil/build.sh -j$(nproc)
|
||||
|
||||
# Unknown stuff goes here
|
||||
./build.sh -j$(nproc)
|
||||
|
||||
RUN ln -sf /hush/src/komodod /usr/bin/komodod && \
|
||||
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-komodo-cli.sh /usr/bin/hush-cli
|
||||
ln -sf /hush/zcutil/docker-hush-cli.sh /usr/bin/hush-cli
|
||||
|
||||
CMD ["entrypoint"]
|
||||
|
||||
@@ -1,47 +1,36 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2019-2020 Hush developers
|
||||
|
||||
#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
|
||||
mkdir -p $HOME/.komodo
|
||||
|
||||
echo "...Creating komodo.conf"
|
||||
cat <<EOF > $HOME/.komodo/komodo.conf
|
||||
rpcuser=${rpcuser:-komodorpc}
|
||||
echo "...Creating HUSH3.conf"
|
||||
cat <<EOF > $HOME/.komodo/HUSH3.conf
|
||||
rpcuser=hush
|
||||
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}
|
||||
# Some knobs you might want to turn
|
||||
debug=0
|
||||
zdebug=0
|
||||
zindex=0
|
||||
EOF
|
||||
|
||||
cat $HOME/.komodo/komodo.conf
|
||||
cat $HOME/.komodo/HUSH3/HUSH3.conf
|
||||
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
|
||||
|
||||
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 "****************************************************"
|
||||
echo "Running: hushd ${args[@]}"
|
||||
|
||||
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