forked from succinctlabs/op-succinct
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.contract
More file actions
32 lines (24 loc) · 1.12 KB
/
Copy pathDockerfile.contract
File metadata and controls
32 lines (24 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM alpine:3.20 AS deps
RUN apk add --no-cache git ca-certificates && \
git config --global --add safe.directory "*"
WORKDIR /src
COPY . .
# Configure SSL certificate for corporate proxy (optional)
COPY copilot.pem /etc/ssl/copilot.pem
RUN if [ -s /etc/ssl/copilot.pem ]; then \
git config --global http.sslCAInfo /etc/ssl/copilot.pem; \
fi
RUN git submodule update --init --recursive
# Update sp1-contracts to v5.0.0 and fix solidity version compatibility
RUN find contracts/lib/sp1-contracts -name "*.sol" -type f | xargs sed -i 's/pragma solidity \^0.8.20;/pragma solidity >=0.8.15;/'
RUN find contracts/lib/sp1-contracts -name "*.sol" -type f | xargs sed -i 's/pragma solidity 0.8.20;/pragma solidity >=0.8.15;/'
FROM ghcr.io/foundry-rs/foundry:stable
WORKDIR /app/contracts
# Copy dependencies and source files from deps stage
COPY --from=deps /src/contracts/foundry.toml .
COPY --from=deps /src/contracts/lib ./lib
COPY --from=deps /src/contracts/src ./src
COPY --from=deps /src/contracts/script ./script
COPY --from=deps /src/contracts/test ./test
RUN forge test --skip test/validity/Upgrade.t.sol
ENTRYPOINT []