forked from base-org/node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (36 loc) · 1.26 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM golang:1.21 as op
WORKDIR /app
ENV REPO=https://github.com/ethereum-optimism/optimism.git
ENV VERSION=v1.7.1
# for verification:
ENV COMMIT=c87a469d7d679e8a4efbace56c3646b925bcc009
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
RUN cd op-node && \
make VERSION=$VERSION op-node
FROM golang:1.21 as geth
WORKDIR /app
ENV REPO=https://github.com/ethereum-optimism/op-geth.git
ENV VERSION=v1.101308.2
# for verification:
ENV COMMIT=0402d543c3d0cff3a3d344c0f4f83809edb44f10
# avoid depth=1, so the geth build can read tags
RUN git clone $REPO --branch $VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
RUN go run build/ci.go install -static ./cmd/geth
FROM golang:1.21
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=op /app/op-node/bin/op-node ./
COPY --from=geth /app/build/bin/geth ./
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY geth-entrypoint .
COPY op-node-entrypoint .
COPY sepolia ./sepolia
COPY mainnet ./mainnet
CMD ["/usr/bin/supervisord"]