Skip to content
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

fix Dockerfile, several plugins running #599

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG CLN_VERSION="24.02.2"
ARG CLN_VERSION="24.08.1"

FROM elementsproject/lightningd:v${CLN_VERSION}

Expand All @@ -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" ]
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
<network_name>=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)
Expand Down