diff --git a/rollupcreator/Dockerfile b/rollupcreator/Dockerfile index f6406dad..13150b58 100644 --- a/rollupcreator/Dockerfile +++ b/rollupcreator/Dockerfile @@ -1,14 +1,14 @@ FROM node:18-bullseye-slim -ARG NITRO_CONTRACTS_BRANCH=main RUN apt-get update && \ - apt-get install -y git docker.io python3 build-essential curl jq + apt-get install -y git docker.io python3 make gcc g++ curl jq +ARG NITRO_CONTRACTS_BRANCH=main WORKDIR /workspace RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./ RUN git checkout ${NITRO_CONTRACTS_BRANCH} +RUN yarn install && yarn cache clean RUN curl -L https://foundry.paradigm.xyz | bash ENV PATH="${PATH}:/root/.foundry/bin" RUN foundryup RUN touch scripts/config.ts -RUN yarn install RUN yarn build:all ENTRYPOINT ["yarn"] diff --git a/test-node.bash b/test-node.bash index 58cb2ef1..91945e0e 100755 --- a/test-node.bash +++ b/test-node.bash @@ -39,6 +39,7 @@ run=true ci=false validate=false detach=false +nowait=false blockscout=false tokenbridge=false l3node=false @@ -71,13 +72,13 @@ while [[ $# -gt 0 ]]; do read -p "are you sure? [y/n]" -n 1 response if [[ $response == "y" ]] || [[ $response == "Y" ]]; then force_init=true - build_utils=true - build_node_images=true echo else exit 0 fi fi + build_utils=true + build_node_images=true shift ;; --init-force) @@ -179,6 +180,14 @@ while [[ $# -gt 0 ]]; do detach=true shift ;; + --nowait) + if ! $detach; then + echo "Error: --nowait requires --detach to be provided." + exit 1 + fi + nowait=true + shift + ;; --batchposters) simple=false batchposters=$2 @@ -344,7 +353,8 @@ fi if $build_utils; then LOCAL_BUILD_NODES="scripts rollupcreator" - if $tokenbridge || $l3_token_bridge; then + # always build tokenbridge in CI mode to avoid caching issues + if $tokenbridge || $l3_token_bridge || $ci; then LOCAL_BUILD_NODES="$LOCAL_BUILD_NODES tokenbridge" fi @@ -556,7 +566,11 @@ fi if $run; then UP_FLAG="" if $detach; then - UP_FLAG="--wait" + if $nowait; then + UP_FLAG="--detach" + else + UP_FLAG="--wait" + fi fi echo == Launching Sequencer diff --git a/tokenbridge/Dockerfile b/tokenbridge/Dockerfile index dac06fbb..4adce556 100644 --- a/tokenbridge/Dockerfile +++ b/tokenbridge/Dockerfile @@ -1,10 +1,12 @@ FROM node:18-bullseye-slim -ARG TOKEN_BRIDGE_BRANCH=main RUN apt-get update && \ - apt-get install -y git docker.io python3 build-essential + apt-get install -y git docker.io python3 make gcc g++ curl jq +ARG TOKEN_BRIDGE_BRANCH=main WORKDIR /workspace -RUN git clone --no-checkout https://github.com/OffchainLabs/token-bridge-contracts.git ./ -RUN git checkout ${TOKEN_BRIDGE_BRANCH} -RUN yarn install +RUN git clone --no-checkout https://github.com/OffchainLabs/token-bridge-contracts.git ./ && \ + git checkout ${TOKEN_BRIDGE_BRANCH} && \ + rm -rf .git && \ + git init && git add . && git -c user.name="user" -c user.email="user@example.com" commit -m "Initial commit" +RUN yarn install && yarn cache clean RUN yarn build ENTRYPOINT ["yarn"]