Open KurzGedanke opened 7 years ago
The command tries to pipe to the command "node" running on the host, instead of to the docker image. Likewise, it passes the env variable from the host to the image. You have to pass "sh -c" before the command, and escape the environment variable with a "\" like this:
sudo docker exec -it nameOfYourDockerContainer sh -c "./bin/cli --apikey=\$RPC_API_KEY rpc dumpblockchain true | node scripts/list.js"
The command runs without failing, but I haven't actually had the error since I added more RAM to my VM running docker (it now has 8GB), so the error might still be there for other people.
Nice contribution @KurzGedanke and @merklaw !
For everyone who has struggle with listing the tiles you have in a Docker VM: https://docs.docker.com/engine/reference/commandline/exec/
So it should be something like:
docker exec -it nameOfYourDockerContainer ./bin/cli --apikey=$RPC_API_KEY rpc dumpblockchain true | node scripts/list.js
(might be wrong, so.. please test it out)