-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (42 loc) · 2.08 KB
/
Dockerfile
File metadata and controls
57 lines (42 loc) · 2.08 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
ARG RUST_VERSION=1.93
FROM public.ecr.aws/docker/library/rust:${RUST_VERSION}-trixie AS rust-builder-base
WORKDIR /app
ARG MOLD_VERSION=2.40.4
ARG MOLD_SHA256_AARCH64=c799b9ccae8728793da2186718fbe53b76400a9da396184fac0c64aa3298ec37
ARG MOLD_SHA256_ARM=d82792748a81202423ddd2496fc8719404fe694493abdef691cc080392ee44bf
ARG MOLD_SHA256_X86_64=4c999e19ffa31afa5aa429c679b665d5e2ca5a6b6832ad4b79668e8dcf3d8ec1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git libclang-dev pkg-config curl build-essential cmake && \
rm -rf /var/lib/apt/lists/*
RUN set -eux; \
case "$(uname -m)" in \
x86_64) MOLD_ARCH=x86_64; MOLD_SHA256="${MOLD_SHA256_X86_64}" ;; \
aarch64|arm64) MOLD_ARCH=aarch64; MOLD_SHA256="${MOLD_SHA256_AARCH64}" ;; \
armv7l|armv6l) MOLD_ARCH=arm; MOLD_SHA256="${MOLD_SHA256_ARM}" ;; \
*) echo "unsupported architecture: $(uname -m)" >&2; exit 1 ;; \
esac; \
curl -fsSL "https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-${MOLD_ARCH}-linux.tar.gz" -o /tmp/mold.tar.gz; \
echo "${MOLD_SHA256} /tmp/mold.tar.gz" | sha256sum -c -; \
tar -xzf /tmp/mold.tar.gz -C /tmp; \
cp /tmp/mold-${MOLD_VERSION}-${MOLD_ARCH}-linux/bin/* /usr/local/bin/; \
rm -rf /tmp/mold*
FROM rust-builder-base AS reth-base
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN . /tmp/versions.env && git clone $BASE_RETH_NODE_REPO . && \
git checkout tags/$BASE_RETH_NODE_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$BASE_RETH_NODE_COMMIT" ]' || (echo "Commit hash verification failed" && exit 1)
RUN cargo build --bin base-reth-node --bin base-consensus --profile maxperf
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y curl supervisor && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/log/supervisor
WORKDIR /app
COPY --from=reth-base /app/target/maxperf/base-consensus ./
COPY --from=reth-base /app/target/maxperf/base-reth-node ./
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY execution-entrypoint .
COPY consensus-entrypoint .
CMD ["/usr/bin/supervisord"]