2020-06-11 20:19:56 +00:00
|
|
|
FROM golang:1.13 as lnd-base
|
|
|
|
|
|
|
|
ENV GOPATH /go
|
|
|
|
WORKDIR $GOPATH/src
|
|
|
|
|
|
|
|
# LND
|
|
|
|
RUN go get -d github.com/lightningnetwork/lnd
|
|
|
|
WORKDIR $GOPATH/src/github.com/lightningnetwork/lnd
|
|
|
|
RUN make && make install
|
|
|
|
|
2020-07-24 20:24:18 +00:00
|
|
|
FROM ubuntu:20.04 AS lnd-run
|
2020-06-14 17:45:43 +00:00
|
|
|
|
|
|
|
RUN apt update && apt install -yqq \
|
|
|
|
curl gosu jq bash-completion
|
|
|
|
|
|
|
|
COPY --from=lnd-base /go /go
|
2020-06-18 18:35:47 +00:00
|
|
|
COPY --from=lnbook/bitcoind /usr/local/ /usr/local/
|
|
|
|
|
2020-06-14 17:45:43 +00:00
|
|
|
RUN cp /go/src/github.com/lightningnetwork/lnd/contrib/lncli.bash-completion \
|
|
|
|
/usr/share/bash-completion/completions/lncli
|
|
|
|
|
|
|
|
ENV GOPATH /go
|
|
|
|
ENV PATH $PATH:$GOPATH/bin
|
2020-04-19 20:13:18 +00:00
|
|
|
|
|
|
|
ADD lnd /lnd
|
2020-06-11 02:46:55 +00:00
|
|
|
RUN ln -s /lnd /root/.lnd
|
2020-06-11 14:43:32 +00:00
|
|
|
ADD fund-lnd.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/fund-lnd.sh
|
|
|
|
ADD bashrc /root/.bashrc
|
|
|
|
ADD lnd-entrypoint.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/lnd-entrypoint.sh
|
2020-06-14 17:45:43 +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-14 17:45:43 +00:00
|
|
|
|
|
|
|
# LND RPC
|
|
|
|
EXPOSE 10009/tcp
|
|
|
|
|
|
|
|
# LND P2P
|
|
|
|
EXPOSE 9735/tcp
|
2020-04-19 20:13:18 +00:00
|
|
|
|
2020-06-11 02:46:55 +00:00
|
|
|
WORKDIR /lnd
|
2020-06-11 14:43:32 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/lnd-entrypoint.sh"]
|
|
|
|
|
2020-06-18 18:35:47 +00:00
|
|
|
# Show logs from beginning and keep following
|
2020-06-14 17:45:43 +00:00
|
|
|
CMD ["/usr/local/bin/logtail.sh"]
|