diff --git a/build/etherlink/Dockerfile b/build/etherlink/Dockerfile index 02f7079..1a01111 100644 --- a/build/etherlink/Dockerfile +++ b/build/etherlink/Dockerfile @@ -37,6 +37,7 @@ ARG OCTEZ_PROTO COPY --from=octez /usr/local/bin/octez-smart-rollup-node-${OCTEZ_PROTO} /usr/bin/octez-smart-rollup-node COPY --from=octez /usr/local/bin/octez-client /usr/bin/octez-client COPY --from=octez /usr/local/bin/octez-evm-node /usr/bin/octez-evm-node +COPY --from=octez /usr/local/bin/octez-node /usr/bin/octez-node COPY --from=builder /build/bin/wasm_2_0_0/ /root/wasm_2_0_0/ ARG PACKAGE COPY --from=builder /build/bin/${PACKAGE}_installer.wasm /root/kernel.wasm diff --git a/build/etherlink/entrypoint.sh b/build/etherlink/entrypoint.sh index 879528c..487b401 100644 --- a/build/etherlink/entrypoint.sh +++ b/build/etherlink/entrypoint.sh @@ -21,6 +21,9 @@ if [ -z "$NODE_URI" ]; then endpoint="https://rpc.tzkt.io/$NETWORK" fi +TZNETWORK_ADDRESS="https://teztnets.com/$NETWORK" +SNAPSHOT_URL="https://snapshots.eu.tzinit.org/$NETWORK/rolling" + command=$1 shift 1 @@ -41,6 +44,18 @@ import_key() { fi } +run_octez_node() { + octez-node config init --network "$TZNETWORK_ADDRESS" + + if [[ -n ${SNAPSHOT_URL} ]]; then + mkdir -p /snapshot + wget -O "/snapshot" "${SNAPSHOT_URL}" + octez-node snapshot import /snapshot + fi + + octez-node run --rpc-addr=0.0.0.0:8732 --allow-all-rpc 0.0.0.0 +} + run_node() { import_key @@ -119,6 +134,9 @@ send_message() { } case $command in + run_octez_node) + run_octez_node + ;; run_node) run_node ;; @@ -142,6 +160,7 @@ case $command in Available commands: Daemons: +- run_octez_node - run_node - run_sequencer