Open sargue opened 2 years ago
Actually jq
is not even part of the docker image so that won't work either.
Once jq
is installed on the system this change to the Makefile does the trick:
SCRIPTS := $(realpath ./scripts)
##@ Genesis commands
genesis-create: ## Create data/genesis.json from parameters in scripts/params_genesis.json
$(if $(wildcard data/genesis.json), $(error Cannot overwrite data/genesis.json))
$(if $(wildcard scripts/params_genesis.json),,\
$(error Genesis parameters not found in scripts/params_genesis.json))
docker run --rm \
--mount "type=bind,source=${SCRIPTS},destination=/home/geth/scripts" \
${DOCKER_IMAGE} \
zenroom scripts/genesis.lua -a scripts/params_genesis.json | jq . | tee data/genesis.json
@echo
@echo "###########################"
@echo "now RUN: make genesis-init"
@echo "###########################"
@echo
I can prepare a PR if you prefer.
Example:
Those tools are probably inside the docker image so instead of trying to run directly on the host perhaps a solution is to run it inside a docker instance mounting the proper paths.