-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 1.17 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
FROM ghcr.io/foundry-rs/foundry:latest
USER root
ENV FOUNDRY_DISABLE_NIGHTLY_WARNING=1
# Create workspace directory
RUN mkdir -p /workspace && chmod 777 /workspace
WORKDIR /workspace
# Pre-initialize a forge project with common DeFi dependencies.
# Install both OZ v4 (for legacy contracts like 0.6-0.7.x) and v5 (for 0.8.x).
# Also install core DeFi protocol interfaces needed for flash loan exploits.
RUN forge init --no-git /workspace/template && \
cd /workspace/template && \
forge install OpenZeppelin/openzeppelin-contracts --no-git && \
forge install OpenZeppelin/openzeppelin-contracts-upgradeable --no-git && \
forge install Uniswap/v2-core --no-git && \
forge install Uniswap/v2-periphery --no-git && \
forge install Uniswap/v3-core --no-git && \
forge install Uniswap/v3-periphery --no-git && \
forge install smartcontractkit/chainlink --no-git && \
forge install aave/aave-v3-core --no-git && \
forge install compound-finance/compound-protocol --no-git && \
forge build || true
# Keep the template for fast project scaffolding
# Each scan copies from /workspace/template to /workspace/scan
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["sleep infinity"]