2024-05-31 18:07:20 +00:00
|
|
|
FROM ethpandaops/ethereum-genesis-generator:3.0.0 AS ethgen
|
2024-04-25 12:23:30 +00:00
|
|
|
|
|
|
|
FROM golang:1.20-alpine as builder
|
|
|
|
|
2024-05-31 18:07:20 +00:00
|
|
|
RUN apk add --no-cache python3 py3-pip make bash envsubst jq
|
2024-04-25 12:23:30 +00:00
|
|
|
|
|
|
|
# Install ethereum-genesis-generator tools
|
|
|
|
COPY --from=ethgen /apps /apps
|
|
|
|
RUN cd /apps/el-gen && pip3 install --break-system-packages -r requirements.txt
|
2024-05-31 18:07:20 +00:00
|
|
|
RUN pip3 install --break-system-packages --upgrade "web3==v6.15.1"
|
2024-04-25 12:23:30 +00:00
|
|
|
RUN pip3 install --break-system-packages --upgrade "typing-extensions"
|
|
|
|
|
2024-05-31 18:07:20 +00:00
|
|
|
# Install tool to generate initial block
|
|
|
|
RUN go install github.com/cerc-io/eth-dump-genblock@b29516740fc01cf1d1d623acbfd0e9a2b6440a96
|
|
|
|
|
2024-04-25 12:23:30 +00:00
|
|
|
# Build genesis config
|
2024-05-31 18:07:20 +00:00
|
|
|
COPY genesis /opt/genesis
|
2024-04-25 12:23:30 +00:00
|
|
|
RUN cd /opt/genesis && make genesis-el
|
|
|
|
|
|
|
|
# Snag the genesis block info.
|
|
|
|
RUN eth-dump-genblock /opt/genesis/build/el/geth.json > /opt/genesis/build/el/genesis_block.json
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
COPY --from=builder /opt/genesis /opt/genesis
|