diff --git a/Dockerfile b/Dockerfile index a7d529e98..cac2795fd 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|listmempoolfunds'`; 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 284544bab..1f6a8beb0 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,26 @@ Python plugins users must ensure to have a version `>= 3.8`. Python plugins developers must ensure their plugin to work with all Python versions `>= 3.8`. +### `docker` + +#### Choosing a bitcoin network +Edit your config file, `$HOME/.bitcoin/bitcoin.conf`, and be sure the following line is in it: +``` +=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/`| +| 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)