Skip to content

Commit

Permalink
add nitro-node-split docker
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed Apr 30, 2024
1 parent ae3b528 commit 048f55b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions scripts/split-val-entry.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 048f55b

Please sign in to comment.