From 3782dd852ffc4b65a3dc80d9192a314ea59f2e64 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Ortega Date: Thu, 26 Sep 2024 13:25:33 -0600 Subject: [PATCH 1/3] fix Dockerfile, several plugins running --- Dockerfile | 17 +++++++++-------- README.md | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7d529e98..6819647a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG CLN_VERSION="24.02.2" +ARG CLN_VERSION="24.08.1" FROM elementsproject/lightningd:v${CLN_VERSION} @@ -24,14 +24,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 -m pip install --upgrade pip COPY . /tmp/plugins -RUN mkdir /tmp/oldplugins && mv /usr/local/libexec/c-lightning/plugins/* /tmp/oldplugins/ && \ - cd /usr/local/libexec/c-lightning/plugins && \ - git clone --depth 1 --shallow-submodules -j4 \ - ${EXTRA_PLUGINS} \ - file:///tmp/plugins . && \ - pip3 install setuptools && \ + +RUN mkdir /tmp/plugins-enabled/ && cd /tmp/plugins && \ + git submodule update --init --recursive && pip3 install setuptools && \ find -name requirements.txt -print0 | xargs -0 -n 1 pip3 install -r && \ - mv /tmp/oldplugins/* /usr/local/libexec/c-lightning/plugins && rmdir /tmp/oldplugins + ls */ && \ + for plgn in `find . -type f | grep -E '/([^/]+)/\1\.py$'|grep -Ev 'archived|backup|donations|qt'`; do \ + cd /tmp/plugins-enabled && \ + ln -s /tmp/plugins/${plgn}; \ + done EXPOSE 9735 9835 ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "./entrypoint.sh" ] diff --git a/README.md b/README.md index 3bc7610d9..700f15778 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,22 @@ plugin name: One subject line more detailed description (if any) ``` +### `docker` + +#### Choosing a bitcoin network +Edit your config file, `$HOME/.bitcoin/bitcoin.conf`, and be sure the following line is in it: +``` +=1 +``` + +| network | network\_name | command | +|-----------|---------------|---------| +| bitcoin | bitcoin |`docker run -it --rm --network=host -v $HOME/.lightning:/root/.lightning -v $HOME/.bitcoin:/root/.bitcoin mycln-plugins --disable-plugin=bcli --log-level=debug --database-upgrade=true --sauron-api-endpoint https://blockstream.info/api/`| +| mutinynet | signet |`docker run -it --rm --network=host -v $HOME/.lightning:/root/.lightning -v $HOME/.bitcoin:/root/.bitcoin -e LIGHTNINGD_NETWORK=signet mycln-plugins --signet --disable-plugin=bcli --log-level=debug --database-upgrade=true --sauron-api-endpoint https://mutinynet.com/api/`| +| testnet | testnet |`docker run -it --rm --network=host -v $HOME/.lightning:/root/.lightning -v $HOME/.bitcoin:/root/.bitcoin -e LIGHTNINGD_NETWORK=testnet mycln-plugins --testnet --disable-plugin=bcli --log-level=debug --database-upgrade=true --sauron-api-endpoint https://mempool.space/testnet/api`| + + + ## More Plugins from the Community - [@conscott's plugins](https://github.com/conscott/c-lightning-plugins) From 1ccf53221cbce7fc400b9b0ef4568aa7970520e3 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Ortega Date: Thu, 26 Sep 2024 16:56:04 -0600 Subject: [PATCH 2/3] remove listmempoolfunds plugin --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6819647a1..cac2795fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir /tmp/plugins-enabled/ && cd /tmp/plugins && \ git submodule update --init --recursive && pip3 install setuptools && \ find -name requirements.txt -print0 | xargs -0 -n 1 pip3 install -r && \ ls */ && \ - for plgn in `find . -type f | grep -E '/([^/]+)/\1\.py$'|grep -Ev 'archived|backup|donations|qt'`; do \ + for plgn in `find . -type f | grep -E '/([^/]+)/\1\.py$'|grep -Ev 'archived|backup|donations|qt|listmempoolfunds'`; do \ cd /tmp/plugins-enabled && \ ln -s /tmp/plugins/${plgn}; \ done From 0578fda73112b04b2d36fa419432780986adb7e4 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Ortega Date: Thu, 26 Sep 2024 17:55:54 -0600 Subject: [PATCH 3/3] add instructions to build the docker image --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 700f15778..63a16a705 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,11 @@ Edit your config file, `$HOME/.bitcoin/bitcoin.conf`, and be sure the following ``` =1 ``` - +Build the image: +``` +docker build . -t mycln-plugins +``` +Run the container: | network | network\_name | command | |-----------|---------------|---------| | bitcoin | bitcoin |`docker run -it --rm --network=host -v $HOME/.lightning:/root/.lightning -v $HOME/.bitcoin:/root/.bitcoin mycln-plugins --disable-plugin=bcli --log-level=debug --database-upgrade=true --sauron-api-endpoint https://blockstream.info/api/`|