Skip to content

Commit

Permalink
action's Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Mar 8, 2024
1 parent 88cd9cb commit 0d235eb
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:jammy-20240212 as 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 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

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

0 comments on commit 0d235eb

Please sign in to comment.