-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathoptimism-stack.Dockerfile
More file actions
66 lines (47 loc) · 1.9 KB
/
optimism-stack.Dockerfile
File metadata and controls
66 lines (47 loc) · 1.9 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
58
59
60
61
62
63
64
65
66
# Copyright (c) 2024-2025 Hemi Labs, Inc.
# Use of this source code is governed by the MIT License,
# which can be found in the LICENSE file.
FROM golang:1.24.4-bookworm@sha256:c83619bb18b0207412fffdaf310f57ee3dd02f586ac7a5b44b9c36a29a9d5122 AS build_1
WORKDIR /git
ARG OP_GETH_CACHE_BREAK=12F2
RUN git clone https://github.com/hemilabs/op-geth
WORKDIR /git/op-geth
RUN git checkout e79d9922c9acaa5c46597b1ffe0259597aa9499d
RUN go run build/ci.go install -static ./cmd/geth
FROM golang:1.24.4-bookworm@sha256:c83619bb18b0207412fffdaf310f57ee3dd02f586ac7a5b44b9c36a29a9d5122 AS build_2
# store the latest geth here, build with go 1.23
COPY --from=build_1 /git/op-geth/build/bin/geth /bin/geth
RUN apt-get update
RUN apt-get install -y jq nodejs npm netcat-openbsd
RUN npm install -g pnpm
WORKDIR /git
COPY --from=build_1 /git/op-geth /git/op-geth
WORKDIR /git
RUN git clone https://github.com/hemilabs/optimism
WORKDIR /git/optimism
RUN git fetch origin
RUN git checkout ea9fe7b4f2e10f2573934957f4808d8494cfeb9f
WORKDIR /git/optimism
RUN go mod tidy
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="${PATH}:/root/.cargo/bin"
WORKDIR /git
RUN git clone https://github.com/casey/just
WORKDIR /git/just
RUN cargo install just
WORKDIR /git/optimism
# as of now, we have the pop points address hard-coded as the rewards address
# for pop miners, this should change once we do TGE and mint HEMI
# we have no way to configure this AFAIK, so just replace the address in the
# file so we reward to the GovernanceTokenAddr
# once this is changed back in optimism, remove this line
RUN sed -i 's/predeploys.PoPPointsAddr/predeploys.GovernanceTokenAddr/g' ./op-node/rollup/derive/pop_payout.go
WORKDIR /git/optimism/op-node
RUN just op-node
WORKDIR /git/optimism/op-batcher
RUN just op-batcher
WORKDIR /git/optimism/op-proposer
RUN just op-proposer
WORKDIR /git/optimism/op-conductor
RUN just op-conductor
WORKDIR /git/optimism