simplify genesis image
Some checks failed
Test Ethereum Fixturenet Stack / Run Ethereum Fixturenet stack test (push) Successful in 19m5s
Test Ethereum Plugeth Fixturenet Stack / Test fixturenet-plugeth stack (push) Failing after 31m11s

This commit is contained in:
Roy Crihfield 2024-06-27 20:34:11 +08:00
parent 7d5770ac9e
commit a64c29ac34
2 changed files with 7 additions and 15 deletions

View File

@ -1,23 +1,15 @@
FROM ethpandaops/ethereum-genesis-generator:3.0.0 AS ethgen FROM ethpandaops/ethereum-genesis-generator:3.0.0 AS ethgen
# Build genesis config
ADD genesis /opt/genesis
RUN cd /opt/genesis && make genesis-el
FROM golang:1.21-alpine as builder FROM golang:1.21-alpine as builder
RUN apk add --no-cache python3 py3-pip make bash envsubst jq gcc COPY --from=ethgen /opt/genesis /opt/genesis
# Install ethereum-genesis-generator tools
COPY --from=ethgen /apps /apps
RUN cd /apps/el-gen && pip3 install --break-system-packages -r requirements.txt
RUN pip3 install --break-system-packages --upgrade "web3>=v6.15.1"
RUN pip3 install --break-system-packages --upgrade "typing-extensions"
# Install tool to generate initial block
RUN CGO_ENABLED=0 go install github.com/cerc-io/eth-dump-genblock@v0.2.0
# Build genesis config
COPY genesis /opt/genesis
RUN cd /opt/genesis && make genesis-el
# Snag the genesis block info. # Snag the genesis block info.
RUN CGO_ENABLED=0 go install github.com/cerc-io/eth-dump-genblock@v0.2.0
RUN eth-dump-genblock /opt/genesis/build/el/geth.json > /opt/genesis/build/el/genesis_block.json RUN eth-dump-genblock /opt/genesis/build/el/geth.json > /opt/genesis/build/el/genesis_block.json
FROM alpine:latest FROM alpine:latest

View File

@ -6,7 +6,7 @@ genesis: genesis-el
.PHONY: genesis-el .PHONY: genesis-el
genesis-el: genesis-el:
cd el; ./build_el.sh cd el && . /apps/el-gen/.venv/bin/activate && ./build_el.sh
.PHONY: clean .PHONY: clean
clean: clean: