-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (37 loc) · 1.27 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM golang:1.18.2-alpine as builder
ENV GODEBUG netdns=cgo
ARG checkout="master"
ARG git_url="https://github.com/lightningnetwork/lnd"
ARG checkoutINIT="main"
ARG git_urlINIT="https://github.com/lightninglabs/lndinit"
RUN apk add --no-cache --update alpine-sdk \
git \
make \
gcc \
&& git clone $git_url /go/src/github.com/lightningnetwork/lnd \
&& cd /go/src/github.com/lightningnetwork/lnd \
&& git checkout $checkout \
&& make release-install
RUN git clone $git_urlINIT /go/src/github.com/lightninglabs/lndinit \
&& cd /go/src/github.com/lightninglabs/lndinit \
&& git checkout $checkoutINIT \
&& make release-install
FROM alpine as final
RUN apk --no-cache add \
bash \
jq \
ca-certificates \
gnupg \
curl
# Copy the binary from the builder image.
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/lnd /bin/
COPY --from=builder /go/src/github.com/lightningnetwork/lnd/scripts/verify-install.sh /
COPY --from=builder /go/src/github.com/lightningnetwork/lnd/scripts/keys/* /keys/
COPY --from=builder /go/bin/lndinit /bin/
RUN sha256sum /bin/lnd /bin/lncli > /shasums.txt \
&& cat /shasums.txt
ADD init-wallet-k8s.sh /init-wallet-k8s.sh
RUN chmod +x /init-wallet-k8s.sh
EXPOSE 9735 10009
ENTRYPOINT ["/init-wallet-k8s.sh"]