diff --git a/Dockerfile b/Dockerfile index 947d6b5a47..c8f9bc2b30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -271,5 +271,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ USER user +FROM nitro-node-dev as nitro-node-split +USER root + +RUN apt-get install -y xxd +COPY scripts/split-val-entry.sh /usr/local/bin +ENTRYPOINT [ "/usr/local/bin/split-val-entry.sh" ] +USER user + FROM nitro-node as nitro-node-default # Just to ensure nitro-node-dist is default diff --git a/scripts/split-val-entry.sh b/scripts/split-val-entry.sh new file mode 100755 index 0000000000..a7fa596f38 --- /dev/null +++ b/scripts/split-val-entry.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +xxd -l 32 -ps -c 40 /dev/urandom > /tmp/nitro-val.jwt +echo launching validation +/usr/local/bin/nitro-val --file-logging.file nitro-val.log --auth.addr 127.0.0.10 --auth.origins 127.0.0.1 --auth.jwtsecret /tmp/nitro-val.jwt --auth.port 2000 & +sleep 2 +echo launching nitro-node +/usr/local/bin/nitro --node.block-validator.execution-server.jwtsecret /tmp/nitro-val.jwt --node.block-validator.execution-server.url http://127.0.0.10:2000 "$@"