-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (24 loc) · 905 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
33
34
35
36
FROM rust:1.82-slim AS builder
ENV CARGO_HOME=/usr/local/cargo
# Install necessary dependencies
RUN apt update && \
apt install -y cmake clang openssl make && \
rm -rf /var/lib/apt/lists/*
ENV PATH="$CARGO_HOME/bin:${PATH}"
ENV CARGO_INCREMENTAL=1
# ENV CARGO_BUILD_JOBS=$(nproc)
# Set the working directory
WORKDIR /usr/src/hyperlane-reth
# Copy the source code into the builder
COPY . .
# Build and install the hyperlane-reth binary
RUN make build-exex && make install-exex
FROM ubuntu:22.04
RUN apt update && apt install -y openssl && rm -rf /var/lib/apt/lists/*
ENV PATH="/usr/local/cargo/bin:${PATH}"
# Copy the hyperlane-reth binary from the builder
COPY --from=builder /usr/local/cargo/bin/hyperlane-reth /usr/local/bin/hyperlane-reth
# Verify that the binary is present
RUN chmod +x /usr/local/bin/hyperlane-reth && \
hyperlane-reth --version
ENTRYPOINT ["hyperlane-reth"]