-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate Dockerfile for action and as base
- Loading branch information
Showing
3 changed files
with
58 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,4 @@ | ||
FROM ubuntu:jammy-20240212 as solc-builder | ||
FROM ghcr.io/fgimenez/eip3074-tools:latest | ||
|
||
# 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 | ||
|
||
ENV SOLC_COMMIT=c3af02c281f54932c0adcbdf32899d0d6e988850 | ||
|
||
# Clone the Solidity repository | ||
RUN git clone https://github.com/ethereum/solidity.git /app/solidity | ||
|
||
WORKDIR /app/solidity | ||
|
||
RUN git checkout $SOLC_COMMIT | ||
|
||
COPY ./patches/solc.diff . | ||
RUN git apply solc.diff && \ | ||
mkdir build && \ | ||
cd build && \ | ||
ls -al /app/solidity && \ | ||
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=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/forge"] | ||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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 | ||
|
||
ENV SOLC_COMMIT=c3af02c281f54932c0adcbdf32899d0d6e988850 | ||
|
||
# Clone the Solidity repository | ||
RUN git clone https://github.com/ethereum/solidity.git /app/solidity | ||
|
||
WORKDIR /app/solidity | ||
|
||
RUN git checkout $SOLC_COMMIT | ||
|
||
COPY ./patches/solc.diff . | ||
RUN git apply solc.diff && \ | ||
mkdir build && \ | ||
cd build && \ | ||
ls -al /app/solidity && \ | ||
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=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 |