lightning icon indicating copy to clipboard operation
lightning copied to clipboard

how to set the `--wallet` command line param in the docker image

Open djpnewton opened this issue 3 years ago • 3 comments
trafficstars

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?

djpnewton avatar May 18 '22 21:05 djpnewton

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

djpnewton avatar May 19 '22 02:05 djpnewton

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

vincenzopalazzo avatar May 19 '22 07:05 vincenzopalazzo

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

cdecker avatar Jul 12 '22 12:07 cdecker