-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak docker entrypoint to support regtest, testnet #3813
Tweak docker entrypoint to support regtest, testnet #3813
Conversation
879830a
to
f591958
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck
has a couple of complaints. Though one of them is not on code you modified, huh. https://travis-ci.org/github/ElementsProject/lightning/jobs/705137711#L967-L977
Also commit title should probably change as well. |
3a039cf
to
2cb94e2
Compare
Updated according to the review. I also dropped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not commit message say "take LIGHTNING_NETWORK env variable in Dockerfile"?
2cb94e2
to
37887d1
Compare
Right, I was careless. updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 37887d1
Also probably deserves a Changelog entry in the commit message:
Though wording might be changed depending on how exactly Docker terminology is, I am not a Docker expert. |
37887d1
to
ad0ab73
Compare
Changelog added. I couldn't find any past changelog which uses newline. So I avoided using it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK ad0ab73
ad0ab73
to
5092f33
Compare
Rebased on master. Reapplying ACK: ACK 5092f33 |
Before this, docker image will never detects that `lightning-rpc` was created if it is running in regtest or testnet, because the file will be created under subfolder for each network name, and entrypoint does not check "lightning-rpc" file in those folders. By specifying `LIGHTNINGD_NETWORK` environment var in dockerfile, we can now check correct path. Changelog-Added: Docker build now includes `LIGHTNINGD_NETWORK` ENV variable which defaults to "bitcoin". An user can override this (e.g. by `-e` option in `docker run`) to run docker container in regtest or testnet or any valid argument to `--network`.
5092f33
to
5debe5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5debe5b
Before this, docker image will never detects that
lightning-rpc
was created if it is running in regtestor testnet, because the file will be created under
subfolder for each network name.
By recursively checking the file creation, now dockercan be run in any network configuration.
I had to deal the path for argument to the
socat
, so I added a newENV
entry in Dockerfile to detect the correct network.