feat: use already-built image in Dockerfile of l1-node-genesis-generator (#669)

* feat: use already-built image in Dockerfile of l1-node-genesis-generator

* feat: get genesis time automatically in generate-genesis.sh and make L1_GENESIS_TIME optional

* feat: make sed in-place command portable with both OS in generate-genesis.sh
This commit is contained in:
jonesho
2025-02-14 03:12:59 +08:00
committed by GitHub
parent 4c01e012ef
commit c7f6e5943e
5 changed files with 36 additions and 33 deletions

View File

@@ -1,16 +1,5 @@
include makefile-contracts.mk
define get_future_time
$(shell \
OS=$$(uname); \
if [ "$$OS" = "Linux" ]; then \
date -d '+3 seconds' +%s; \
elif [ "$$OS" = "Darwin" ]; then \
date -v +3S +%s; \
fi \
)
endef
docker-pull-images-external-to-monorepo:
docker compose -f docker/compose-tracing-v1-ci-extension.yml -f docker/compose-tracing-v2-ci-extension.yml --profile external-to-monorepo pull
@@ -42,7 +31,7 @@ start-env:
echo "Starting stack reusing previous state"; \
fi; \
mkdir -p tmp/local; \
L1_GENESIS_TIME=$(get_future_time) COMPOSE_PROFILES=$(COMPOSE_PROFILES) docker compose -f $(COMPOSE_FILE) up -d; \
COMPOSE_PROFILES=$(COMPOSE_PROFILES) docker compose -f $(COMPOSE_FILE) up -d; \
while [ "$$(docker compose -f $(COMPOSE_FILE) ps -q l1-el-node | xargs docker inspect -f '{{.State.Health.Status}}')" != "healthy" ] || \
[ "$$(docker compose -f $(COMPOSE_FILE) ps -q sequencer | xargs docker inspect -f '{{.State.Health.Status}}')" != "healthy" ]; do \
sleep 2; \