2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-06 21:20:29 +00:00
lnbook/code/docker/lnd/Dockerfile

50 lines
1.2 KiB
Docker
Raw Normal View History

FROM golang:1.13 as lnd-base
ENV GOPATH /go
WORKDIR $GOPATH/src
# LND
2020-12-11 15:51:51 +00:00
ENV LND_VER v0.11.1-beta
RUN go get -d github.com/lightningnetwork/lnd
WORKDIR $GOPATH/src/github.com/lightningnetwork/lnd
2020-12-11 15:51:51 +00:00
RUN git checkout tags/${LND_VER}
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
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
RUN ln -s /lnd /root/.lnd
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
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
WORKDIR /lnd
ENTRYPOINT ["/usr/local/bin/lnd-entrypoint.sh"]
# Show logs from beginning and keep following
2020-06-14 17:45:43 +00:00
CMD ["/usr/local/bin/logtail.sh"]