2024-04-30 22:24:19 +00:00
|
|
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
2024-04-25 12:23:30 +00:00
|
|
|
|
|
|
|
FROM golang:1.20-alpine as builder
|
|
|
|
|
2024-04-30 22:24:19 +00:00
|
|
|
RUN apk add --no-cache python3 py3-pip
|
|
|
|
|
|
|
|
COPY genesis /opt/genesis
|
2024-04-25 12:23:30 +00:00
|
|
|
|
|
|
|
# Install ethereum-genesis-generator tools
|
2024-04-30 22:24:19 +00:00
|
|
|
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/
|
|
|
|
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/
|
2024-04-25 12:23:30 +00:00
|
|
|
COPY --from=ethgen /apps /apps
|
|
|
|
RUN cd /apps/el-gen && pip3 install --break-system-packages -r requirements.txt
|
2024-04-30 22:24:19 +00:00
|
|
|
# web3==5.24.0 used by el-gen is broken on python 3.11
|
|
|
|
RUN pip3 install --break-system-packages --upgrade "web3==6.5.0"
|
2024-04-25 12:23:30 +00:00
|
|
|
RUN pip3 install --break-system-packages --upgrade "typing-extensions"
|
|
|
|
|
|
|
|
# Build genesis config
|
2024-04-30 22:24:19 +00:00
|
|
|
RUN apk add --no-cache make bash envsubst jq
|
2024-04-25 12:23:30 +00:00
|
|
|
RUN cd /opt/genesis && make genesis-el
|
|
|
|
|
|
|
|
# Snag the genesis block info.
|
2024-04-30 22:24:19 +00:00
|
|
|
RUN go install github.com/cerc-io/eth-dump-genblock@latest
|
2024-04-25 12:23:30 +00:00
|
|
|
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
|