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
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "3"
networks:
api_server_default:
external: true
services:
rollup-fullnode:
depends_on:
- geth
networks:
- api_server_default
build:
context: packages/rollup-full-node
dockerfile: Dockerfile
ports:
- 8545:8545
geth:
volumes:
- geth-data:/root/.ethereum
build:
context: docker/geth
dockerfile: Dockerfile
volumes:
geth-data:
7 changes: 7 additions & 0 deletions docker/geth/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ethereum/client-go
COPY rollup-fullnode.json /etc/
COPY entrypoint.sh /bin
RUN chmod +x /bin/entrypoint.sh

EXPOSE 8545
ENTRYPOINT ["sh", "/bin/entrypoint.sh"]
14 changes: 14 additions & 0 deletions docker/geth/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
case $1 in
setup)
geth init etc/rollup-fullnode.json;
geth account new --password /dev/null | grep -oh "0x[a-fA-F0-9]\{40\}" > root/.ethereum/address.txt;
break
;;
"")
geth --syncmode 'full' --rpc --rpcaddr 'localhost' --rpcapi 'eth,net' --networkid 12 --nodiscover --nousb --allow-insecure-unlock --gasprice '1' --mine
break
;;
*)
$1
;;
esac
Loading