-
Notifications
You must be signed in to change notification settings - Fork 113
/
aion-docker.sh
executable file
·25 lines (20 loc) · 1.09 KB
/
aion-docker.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
#!/bin/bash
mkdir -p mainnet
cp -r config/mainnet mainnet/config
#TODO: Mostly used for development purposes; remove miner setup after changing consensus
echo "Setting up miner..."
/bin/bash -c ./create-coinbase.sh
echo "Overriding config parameters..."
python3 ./override-config.py
#TODO: Mostly used for development purposes
if [ ! -z "${difficulty}" ]; then
echo "Overriding difficulty with ${difficulty}"
sed 's/"difficulty": "0x4000"/"difficulty": "'${difficulty}'"/g' -i ./mainnet/config/genesis.json
fi
#TODO: We wont's support setting options for the script as the container will have to be teared down after
#TODO: running and recreated again. This is not feasible in a production environment.Instead of passing options to the
#TODO: startup script we should provide a rpc/java API that will allow the required functionality to be present after
#TODO: kernel startup. Until then we can still use that functionality by manually starting a bash session in the
#TODO: container and running the commands that we need. Check DOCKER.md for more details.
echo "Starting kernel..."
/bin/bash -c ./aion.sh