-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (29 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
44 lines (29 loc) · 1.26 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
FROM rust:1.88 AS base-consensus
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN apt-get update && apt-get -y upgrade && \
apt-get install -y git libclang-dev pkg-config curl build-essential && \
rm -rf /var/lib/apt/lists/*
RUN . /tmp/versions.env && git clone $BASE_NODE_REPO . && \
git checkout tags/$BASE_NODE_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$BASE_NODE_COMMIT" ]' || (echo "Commit hash verification failed" && exit 1)
RUN cargo build --bin base-consensus --profile maxperf
FROM golang:1.24 AS geth
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN . /tmp/versions.env && git clone $OP_GETH_REPO --branch $OP_GETH_TAG --single-branch . && \
git switch -c branch-$OP_GETH_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$OP_GETH_COMMIT" ]'
RUN go run build/ci.go install -static ./cmd/geth
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y jq curl supervisor && \
rm -rf /var/lib/apt/lists
RUN mkdir -p /var/log/supervisor
WORKDIR /app
COPY --from=base-consensus /app/target/maxperf/base-consensus ./
COPY --from=geth /app/build/bin/geth ./
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY geth/geth-entrypoint ./execution-entrypoint
COPY base-consensus-entrypoint .
CMD ["/usr/bin/supervisord"]