-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (35 loc) · 1.21 KB
/
Copy pathDockerfile
File metadata and controls
45 lines (35 loc) · 1.21 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
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.11-slim
LABEL maintainer="Maxwell VOSS"
LABEL description="AI-powered smart contract scanner for Ethereum, Base & Solana"
LABEL version="3.2"
# Install solc and system dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
git \
curl \
jq \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
RUN pip install --no-cache-dir slither-analyzer solc-select
# Install common solc versions for Slither
RUN solc-select install 0.8.20 && \
solc-select install 0.8.24 && \
solc-select use 0.8.24
# Install Foundry
ENV FOUNDRY_DIR=/opt/foundry
RUN curl -L https://foundry.paradigm.xyz | bash && \
/root/.foundry/bin/foundryup -b master && \
cp /root/.foundry/bin/* /usr/local/bin/
# Install Rust for Solana/Anchor support
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
cargo install cargo-audit
# Copy the scanner code
COPY . /app
WORKDIR /app
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]