Cannot provide a custom genesis.json as volume
I want to start a node with a custom genesis, using a custom chain ID (testchain). I mount the generated genesis.json as follows:
version: "3.4"
services:
dvotenode:
build:
context: ../../
image: "vocdoni/go-dvote"
env_file: env
volumes:
- "run:/app/run"
- "eth:/app/eth:ro"
- "./genesis.json:/app/run/testchain/vochain/config/genesis.json:ro"
ports:
...
Looks like the startup detects the file under the path, but comparing it with the hardcoded (?) tries to delete it:
Executing /app/dvotenode
2020/10/21 10:19:19 WARNING: proto: file "pb.proto" is already registered
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
vocdoni dvote version "v0.6.0-56-g60d45cd-dirty"
no signing key, generating one...
2020-10-21T10:19:19Z INFO dvotenode/dvotenode.go:322 logger construction succeeded at level info and output stdout
2020-10-21T10:19:19Z WARN dvotenode/dvotenode.go:334 non Critical error loading config: creating new config file in /app/run/testchain
2020-10-21T10:19:19Z INFO dvotenode/dvotenode.go:368 starting vocdoni dvote node version "v0.6.0-56-g60d45cd-dirty" in miner mode
2020-10-21T10:19:19Z WARN dvotenode/dvotenode.go:382 developer mode is enabled, I hope you know what you are doing ;)
2020-10-21T10:19:19Z INFO service/vochain.go:23 creating vochain service for network testchain
2020-10-21T10:19:19Z INFO dvotenode/dvotenode.go:364 started pprof http endpoints at http://127.0.0.1:36145/debug/pprof
2020-10-21T10:19:19Z INFO service/vochain.go:45 vochain listening on: 0.0.0.0:26656
2020-10-21T10:19:19Z INFO service/vochain.go:46 vochain exposed IP address: 81.172.34.127:26656
2020-10-21T10:19:19Z INFO service/vochain.go:47 vochain RPC listening on: 127.0.0.1:26657
2020-10-21T10:19:19Z INFO service/vochain.go:65 found genesis file, comparing with the hardcoded one
2020-10-21T10:19:19Z WARN service/vochain.go:70 local genesis is different from the hardcoded, cleaning and restarting Vochain
2020-10-21T10:19:19Z FATAL dvotenode/dvotenode.go:458 unlinkat /app/run/testchain/vochain/config/genesis.json: device or resource busy
gitlab.com/vocdoni/go-dvote/log.Fatal
/src/log/log.go:132
main.main
/src/cmd/dvotenode/dvotenode.go:458
runtime.main
/usr/local/go/src/runtime/proc.go:204