Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docker/geth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ EXPOSE 8545 8546 8547 30303 30303/udp
## end ethereum/client-go

RUN apk add --no-cache openssl jq
COPY rollup-fullnode.json /etc/
COPY entrypoint.sh /bin
RUN chmod +x /bin/entrypoint.sh

EXPOSE 9545
ENTRYPOINT ["sh", "/bin/entrypoint.sh"]
ENTRYPOINT ["sh", "/bin/entrypoint.sh"]
6 changes: 2 additions & 4 deletions docker/geth/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi

## One-time configuration to be run only on first startup
if [ ! -f $SETUP_RUN_PATH ]; then
echo "Generating keys and initializing geth..."
echo "Generating keys..."

generate_private_key > $SEALER_PRIVATE_KEY_PATH
import_private_key $SEALER_PRIVATE_KEY_PATH > $SEALER_ADDRESS_PATH
Expand All @@ -74,16 +74,14 @@ if [ ! -f $SETUP_RUN_PATH ]; then

generate_geneisis `cat $SEALER_ADDRESS_PATH` `cat $ADDRESS_PATH`

geth --datadir $VOLUME_PATH --nousb --verbosity 0 init $GENESIS_PATH 2> /dev/null;
echo "Ran Setup" > $SETUP_RUN_PATH

echo "Setup Complete"
echo "Sealer Address: 0x`cat $SEALER_ADDRESS_PATH`"
echo "Account Address: 0x`cat $ADDRESS_PATH`"
else
echo "FOUND EXISTING GETH DATA"
fi

echo "Starting Geth..."
## Command to kick off geth
geth --datadir $VOLUME_PATH --syncmode 'full' --rpc --rpcaddr $HOSTNAME --rpcvhosts=* --rpcapi 'eth,net' --rpcport $PORT --networkid $NETWORK_ID --nodiscover --nousb --allow-insecure-unlock -unlock `cat $SEALER_ADDRESS_PATH` --password /dev/null --gasprice '1' --mine
geth --dev --datadir $VOLUME_PATH --rpc --rpcaddr $HOSTNAME --rpcvhosts=* --rpcport $PORT --networkid $NETWORK_ID --rpcapi 'eth,net' --gasprice '0' --targetgaslimit '4294967295'
Loading