-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.base
60 lines (41 loc) · 1.4 KB
/
Dockerfile.base
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM ubuntu:jammy-20240212 as solc-builder
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
libboost-all-dev \
&& \
update-ca-certificates
COPY . /app
WORKDIR /app
RUN git submodule init && git submodule update --recursive
WORKDIR /app/patches/solidity
RUN mkdir build && \
cd build && \
ls -al /app/patches/solidity && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make solc
FROM rust:1.76.0-slim-buster as foundry-builder
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git
COPY . /app
WORKDIR /app
RUN git submodule init && git submodule update --recursive
WORKDIR /app/patches/foundry
RUN cargo build --bin forge --release && \
cargo build --bin anvil --release
FROM ubuntu:jammy-20240212
# Copy the compiled solc binary to a standard location
COPY --from=solc-builder /app/patches/solidity/build/solc/solc /usr/local/bin/solc
COPY --from=foundry-builder /app/patches/foundry/target/release/forge /usr/local/bin/forge
COPY --from=foundry-builder /app/patches/foundry/target/release/anvil /usr/local/bin/anvil
RUN chmod +x /usr/local/bin/solc && \
chmod +x /usr/local/bin/forge && \
chmod +x /usr/local/bin/anvil
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8545
ENTRYPOINT ["/entrypoint.sh"]