lightning
lightning copied to clipboard
how to set the `--wallet` command line param in the docker image
I would like to use the new --wallet param to make backups.
I have updated to the new v0.11 docker image (elementsproject/lightningd:v0.11.0.1) but I havent figured out how I can set the --wallet parameter?
docker-entrypoint.sh starts lightningd like: lightningd "$@" so I guess you could just override the entrypoint in docker-compose.yml or a child Dockerfile and do something like:
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "./entrypoint.sh", "--wallet", "<WALLET_PARAM>" ]
Although it would be nice to have an environment variable to set
I agree! in this case, we should have some smart bash script that recognizes if we are running a lightning-cli command or lightning, something that I have done in https://github.com/clightning4j/clightning4j-node/blob/main/v0.11.0/entrypoint.sh but not in bash
Notice that the $@ should forward any argument to the entrypoint script to the lightningd process, so ideally you'd only need docker run lightningd --wallet=... --otheroptions, no need for wrappers and similar logic.
Now, I'm not sure that this works given the quotation marks around the $@, and we should remove them if it is interfering, but the idea pretty much is that you can call the docket image just as if it were a normal binary