File tree Expand file tree Collapse file tree 4 files changed +82
-8
lines changed Expand file tree Collapse file tree 4 files changed +82
-8
lines changed Original file line number Diff line number Diff line change 1
- FROM ghcr.io/foundry-rs/foundry:nightly-19d69f277de96f621d930cdb767a9693c55ae8e1 as foundry
1
+ # Use the latest node Debian slim base image
2
+ # This makes installing yarn dep much easier
3
+ FROM node:20-bookworm-slim
2
4
3
- RUN apk add --no-cache bash jq
5
+ # Switch to bash shell
6
+ SHELL ["/bin/bash", "-c"]
4
7
5
- WORKDIR /contracts
8
+ WORKDIR /root
9
+
10
+ # Install dependencies
11
+ RUN apt update
12
+ RUN apt install --yes curl bash coreutils git jq
13
+
14
+ # Download and run the Foundry installation script
15
+ RUN curl -L https://foundry.paradigm.xyz | bash
16
+
17
+ # Set the environment variables to ensure Foundry tools are in the PATH
18
+ ENV PATH="/root/.foundry/bin:${PATH}"
19
+
20
+ # Run foundryup to update Foundry
21
+ RUN foundryup -v nightly-88011569efcebc9152267be217c8cfbedc32c07c
6
22
7
23
# copy dependencies
8
24
COPY ./lib /contracts/lib
@@ -20,6 +36,7 @@ COPY ./scripts /contracts/scripts
20
36
ENV FOUNDRY_EVM_VERSION="cancun"
21
37
ENV FOUNDRY_BYTECODE_HASH="none"
22
38
39
+ WORKDIR /contracts
23
40
RUN forge build
24
41
25
42
# copy script configs
Original file line number Diff line number Diff line change 1
- FROM ghcr.io/foundry-rs/foundry:nightly-19d69f277de96f621d930cdb767a9693c55ae8e1 as foundry
1
+ # Use the latest node Debian slim base image
2
+ # This makes installing yarn dep much easier
3
+ FROM node:20-bookworm-slim
2
4
3
- RUN apk add --no-cache bash jq
5
+ # Switch to bash shell
6
+ SHELL ["/bin/bash", "-c"]
4
7
5
- WORKDIR /contracts
8
+ WORKDIR /root
9
+
10
+ # Install dependencies
11
+ RUN apt update
12
+ RUN apt install --yes curl bash coreutils git jq
13
+
14
+ # Download and run the Foundry installation script
15
+ RUN curl -L https://foundry.paradigm.xyz | bash
16
+
17
+ # Set the environment variables to ensure Foundry tools are in the PATH
18
+ ENV PATH="/root/.foundry/bin:${PATH}"
19
+
20
+ # Run foundryup to update Foundry
21
+ RUN foundryup -v nightly-88011569efcebc9152267be217c8cfbedc32c07c
6
22
7
23
# copy dependencies
8
24
COPY ./lib /contracts/lib
@@ -20,6 +36,7 @@ COPY ./scripts /contracts/scripts
20
36
ENV FOUNDRY_EVM_VERSION="cancun"
21
37
ENV FOUNDRY_BYTECODE_HASH="none"
22
38
39
+ WORKDIR /contracts
23
40
RUN forge build
24
41
25
42
# copy script configs
Original file line number Diff line number Diff line change @@ -5,6 +5,22 @@ tag=${latest_commit:0:8}
5
5
echo " Using Docker image tag: $tag "
6
6
echo " "
7
7
8
- docker build -f docker/Dockerfile.gen-configs -t scrolltech/scroll-stack-contracts:gen-configs-$tag --platform linux/amd64 .
8
+ docker build -f docker/Dockerfile.gen-configs -t scrolltech/scroll-stack-contracts:gen-configs-$tag -amd64 --platform linux/amd64 .
9
+ echo
10
+ echo " built scrolltech/scroll-stack-contracts:gen-configs-$tag -amd64"
11
+ echo
9
12
10
- docker build -f docker/Dockerfile.deploy -t scrolltech/scroll-stack-contracts:deploy-$tag --platform linux/amd64 .
13
+ docker build -f docker/Dockerfile.gen-configs -t scrolltech/scroll-stack-contracts:gen-configs-$tag -arm64 --platform linux/arm64 .
14
+ echo
15
+ echo " built scrolltech/scroll-stack-contracts:gen-configs-$tag -arm64"
16
+ echo
17
+
18
+ docker build -f docker/Dockerfile.deploy -t scrolltech/scroll-stack-contracts:deploy-$tag -amd64 --platform linux/amd64 .
19
+ echo
20
+ echo " built scrolltech/scroll-stack-contracts:deploy-$tag -amd64"
21
+ echo
22
+
23
+ docker build -f docker/Dockerfile.deploy -t scrolltech/scroll-stack-contracts:deploy-$tag -arm64 --platform linux/arm64 .
24
+ echo
25
+ echo " built scrolltech/scroll-stack-contracts:deploy-$tag -arm64"
26
+ echo
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ latest_commit=$( git log -1 --pretty=format:%h)
4
+ tag=${latest_commit: 0: 8}
5
+ echo " Using Docker image tag: $tag "
6
+ echo " "
7
+
8
+ docker push scrolltech/scroll-stack-contracts:gen-configs-$tag -amd64
9
+ docker push scrolltech/scroll-stack-contracts:gen-configs-$tag -arm64
10
+
11
+ docker manifest create scrolltech/scroll-stack-contracts:gen-configs-$tag \
12
+ --amend scrolltech/scroll-stack-contracts:gen-configs-$tag -amd64 \
13
+ --amend scrolltech/scroll-stack-contracts:gen-configs-$tag -arm64
14
+
15
+ docker manifest push scrolltech/scroll-stack-contracts:gen-configs-$tag
16
+
17
+ docker push scrolltech/scroll-stack-contracts:deploy-$tag -amd64
18
+ docker push scrolltech/scroll-stack-contracts:deploy-$tag -arm64
19
+
20
+ docker manifest create scrolltech/scroll-stack-contracts:deploy-$tag \
21
+ --amend scrolltech/scroll-stack-contracts:deploy-$tag -amd64 \
22
+ --amend scrolltech/scroll-stack-contracts:deploy-$tag -arm64
23
+
24
+ docker manifest push scrolltech/scroll-stack-contracts:deploy-$tag
You can’t perform that action at this time.
0 commit comments