2020-06-18 21:22:44 +00:00
|
|
|
FROM lnbook/bitcoind AS c-lightning-base
|
2020-06-15 14:40:23 +00:00
|
|
|
|
|
|
|
# Install software-properties-common to add apt repositories
|
|
|
|
RUN apt update && apt install -yqq \
|
|
|
|
software-properties-common
|
|
|
|
|
|
|
|
# c-lightning
|
|
|
|
RUN add-apt-repository -u ppa:lightningnetwork/ppa
|
2020-06-16 13:45:12 +00:00
|
|
|
RUN apt-get install -yqq \
|
2020-06-15 14:40:23 +00:00
|
|
|
lightningd
|
|
|
|
|
2020-06-17 17:43:37 +00:00
|
|
|
ADD https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/lightning-cli.bash-completion /usr/share/bash-completion/completions/lightning-cli
|
|
|
|
|
2020-06-15 14:40:23 +00:00
|
|
|
FROM c-lightning-base AS c-lightning-run
|
|
|
|
|
|
|
|
ADD lightningd /lightningd
|
|
|
|
WORKDIR /lightningd
|
|
|
|
RUN ln -s /lightningd /root/.lightning
|
|
|
|
|
|
|
|
ADD bashrc /root/.bashrc
|
|
|
|
ADD c-lightning-entrypoint.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/c-lightning-entrypoint.sh
|
|
|
|
ADD fund-c-lightning.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/fund-c-lightning.sh
|
2020-06-17 17:43:37 +00:00
|
|
|
ADD logtail.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/logtail.sh
|
2020-06-18 18:35:47 +00:00
|
|
|
ADD wait-for-bitcoind.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/wait-for-bitcoind.sh
|
2020-06-15 14:40:23 +00:00
|
|
|
|
|
|
|
EXPOSE 9735 9835
|
|
|
|
ENTRYPOINT ["/usr/local/bin/c-lightning-entrypoint.sh"]
|
2020-06-18 18:35:47 +00:00
|
|
|
|
|
|
|
# Show logs from beginning and keep following
|
|
|
|
CMD ["/usr/local/bin/logtail.sh"]
|