forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.reproducible
More file actions
28 lines (25 loc) · 1.24 KB
/
Copy pathDockerfile.reproducible
File metadata and controls
28 lines (25 loc) · 1.24 KB
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
ARG RUST_TOOLCHAIN=1.89.0
FROM docker.io/rust:$RUST_TOOLCHAIN-trixie AS builder
ARG PROFILE
ARG VERSION
# Switch to snapshot repository to pin dependencies
RUN sed -i '/^# http/{N;s|^# \(http[^ ]*\)\nURIs: .*|# \1\nURIs: \1|}' /etc/apt/sources.list.d/debian.sources
COPY .github/scripts/install_llvm_ubuntu.sh /tmp/install_llvm.sh
RUN apt-get -o Acquire::Check-Valid-Until=false update && \
apt-get install -y libjemalloc-dev libclang-dev m4 mold pkg-config && \
/tmp/install_llvm.sh && rm /tmp/install_llvm.sh
WORKDIR /app
COPY . .
RUN RUSTFLAGS_REPRODUCIBLE_EXTRA="-Clink-arg=-fuse-ld=mold" make build-reth-reproducible && \
PROFILE=${PROFILE:-reproducible} VERSION=$VERSION make build-deb-x86_64-unknown-linux-gnu
FROM scratch AS artifacts
COPY --from=builder /app/target/x86_64-unknown-linux-gnu/reproducible/reth /reth
COPY --from=builder /app/target/x86_64-unknown-linux-gnu/reproducible/*.deb /
COPY --from=builder /app/LICENSES /LICENSES
COPY --from=builder /app/README.md /README.md
FROM gcr.io/distroless/cc-debian13:nonroot-239cdd2c8a6b275b6a6f6ed1428c57de2fff3e50
COPY --from=artifacts /reth /reth
COPY --from=artifacts /LICENSES /LICENSES
COPY --from=artifacts /README.md /README.md
EXPOSE 30303 30303/udp 9001 8545 8546
ENTRYPOINT [ "/reth" ]