2021-01-08 10:40:17 +01:00
|
|
|
# If you change this value, please change it in the following files as well:
|
|
|
|
# /.travis.yml
|
|
|
|
# /Dockerfile
|
|
|
|
# /make/builder.Dockerfile
|
|
|
|
# /.github/workflows/main.yml
|
|
|
|
# /.github/workflows/release.yml
|
2022-06-09 23:19:52 +02:00
|
|
|
FROM golang:1.18.2-alpine as builder
|
2016-07-17 02:55:16 +02:00
|
|
|
|
2019-11-20 03:06:17 +01:00
|
|
|
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"
|
2016-07-17 02:55:16 +02:00
|
|
|
|
2016-08-30 00:17:48 +02:00
|
|
|
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
|
|
|
# queries required to connect to linked containers succeed.
|
|
|
|
ENV GODEBUG netdns=cgo
|
|
|
|
|
2018-05-02 05:55:40 +02:00
|
|
|
# Install dependencies and install/build lnd.
|
2018-12-02 19:45:23 +01:00
|
|
|
RUN apk add --no-cache --update alpine-sdk \
|
2018-05-02 05:55:40 +02:00
|
|
|
git \
|
2019-02-06 22:38:15 +01:00
|
|
|
make
|
|
|
|
|
|
|
|
# Copy in the local repository to build from.
|
|
|
|
COPY . /go/src/github.com/lightningnetwork/lnd
|
|
|
|
|
|
|
|
RUN cd /go/src/github.com/lightningnetwork/lnd \
|
2018-05-19 05:47:44 +02:00
|
|
|
&& make \
|
2021-12-06 05:24:06 +01:00
|
|
|
&& make install tags="signrpc walletrpc chainrpc invoicesrpc peersrpc"
|
2016-08-30 00:17:48 +02:00
|
|
|
|
2018-05-02 05:55:40 +02:00
|
|
|
# Start a new, final image to reduce size.
|
|
|
|
FROM alpine as final
|
2017-01-18 00:33:01 +01:00
|
|
|
|
2018-05-02 05:55:40 +02:00
|
|
|
# Expose lnd ports (server, rpc).
|
|
|
|
EXPOSE 9735 10009
|
2017-01-18 00:33:01 +01:00
|
|
|
|
2018-05-02 05:55:40 +02:00
|
|
|
# Copy the binaries and entrypoint from the builder image.
|
2018-05-19 05:47:44 +02:00
|
|
|
COPY --from=builder /go/bin/lncli /bin/
|
|
|
|
COPY --from=builder /go/bin/lnd /bin/
|
2018-05-02 05:55:40 +02:00
|
|
|
|
|
|
|
# Add bash.
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
bash
|
2016-07-17 02:55:16 +02:00
|
|
|
|
2018-05-02 05:55:40 +02:00
|
|
|
# Copy the entrypoint script.
|
2017-01-12 01:12:32 +01:00
|
|
|
COPY "docker/lnd/start-lnd.sh" .
|
2017-01-22 15:44:15 +01:00
|
|
|
RUN chmod +x start-lnd.sh
|