-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
32 lines (23 loc) · 925 Bytes
/
Dockerfile
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
FROM rust:1.84.0 AS llvm-builder
WORKDIR /opt/revive
RUN apt update && \
apt upgrade -y && \
apt install -y cmake ninja-build curl git libssl-dev pkg-config clang lld musl
COPY . .
RUN make install-llvm-builder
RUN revive-llvm --target-env musl clone
RUN revive-llvm --target-env musl build --llvm-projects lld --llvm-projects clang
FROM messense/rust-musl-cross:x86_64-musl AS resolc-builder
WORKDIR /opt/revive
RUN apt update && \
apt upgrade -y && \
apt install -y pkg-config
COPY . .
COPY --from=llvm-builder /opt/revive/target-llvm /opt/revive/target-llvm
ENV LLVM_SYS_181_PREFIX=/opt/revive/target-llvm/musl/target-final
RUN make install-bin
FROM alpine:latest
ADD https://github.com/ethereum/solidity/releases/download/v0.8.28/solc-static-linux /usr/bin/solc
COPY --from=resolc-builder /root/.cargo/bin/resolc /usr/bin/resolc
RUN apk add --no-cache libc6-compat
RUN chmod +x /usr/bin/solc