Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: common docker layer #97

Merged
merged 5 commits into from
Nov 5, 2024
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
6 changes: 3 additions & 3 deletions rollupcreator/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
22 changes: 18 additions & 4 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ run=true
ci=false
validate=false
detach=false
nowait=false
blockscout=false
tokenbridge=false
l3node=false
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions tokenbridge/Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]" commit -m "Initial commit"
RUN yarn install && yarn cache clean
RUN yarn build
ENTRYPOINT ["yarn"]
Loading