Skip to content

Commit

Permalink
added patched forge
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Mar 8, 2024
1 parent 9cc2934 commit 9a34d7e
Show file tree
Hide file tree
Showing 2 changed files with 799 additions and 3 deletions.
28 changes: 25 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:jammy-20240212 as builder
FROM ubuntu:jammy-20240212 as solc-builder

# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -27,11 +27,33 @@ RUN git apply solc.diff && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make solc

FROM rust:1.76.0-slim-buster as forge-builder

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git

ENV FORGE_COMMIT=5b7e4cb3c882b28f3c32ba580de27ce7381f415a

RUN git clone https://github.com/foundry-rs/foundry.git /app/foundry

WORKDIR /app/foundry

RUN git checkout $FORGE_COMMIT

COPY ./patches/forge.diff .

RUN git apply forge.diff && \
cargo build --bin forge --release

FROM ubuntu:jammy-20240212

# Copy the compiled solc binary to a standard location
COPY --from=builder /app/solidity/build/solc/solc /usr/local/bin/solc
RUN chmod +x /usr/local/bin/solc
COPY --from=solc-builder /app/solidity/build/solc/solc /usr/local/bin/solc
COPY --from=forge-builder /app/foundry/target/release/forge /usr/local/bin/forge

RUN chmod +x /usr/local/bin/solc && \
chmod +x /usr/local/bin/forge

# Set the entrypoint to the solc binary
ENTRYPOINT ["/usr/local/bin/solc"]
Loading

0 comments on commit 9a34d7e

Please sign in to comment.