mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-05 02:02:06 +01:00
Add a new `make install-all` command that will perform all `make install` actions along with generating the manpages. The `manpages` command is then removed from the existing `make install` command. The docker build is then updated to use the new `make install-all` command. This is done because some users running `make install` may be doing so in environments where they do not have write access to the directory where the man pages need to be written to.
45 lines
1.2 KiB
Docker
45 lines
1.2 KiB
Docker
# 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
|
|
FROM golang:1.21.0-alpine as builder
|
|
|
|
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"
|
|
|
|
# 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
|
|
|
|
# Install dependencies.
|
|
RUN apk add --no-cache --update alpine-sdk \
|
|
bash \
|
|
git \
|
|
make
|
|
|
|
# Copy in the local repository to build from.
|
|
COPY . /go/src/github.com/lightningnetwork/lnd
|
|
|
|
# Install/build lnd.
|
|
RUN cd /go/src/github.com/lightningnetwork/lnd \
|
|
&& make \
|
|
&& make install-all tags="signrpc walletrpc chainrpc invoicesrpc peersrpc"
|
|
|
|
# Start a new, final image to reduce size.
|
|
FROM alpine as final
|
|
|
|
# Expose lnd ports (server, rpc).
|
|
EXPOSE 9735 10009
|
|
|
|
# Copy the binaries and entrypoint from the builder image.
|
|
COPY --from=builder /go/bin/lncli /bin/
|
|
COPY --from=builder /go/bin/lnd /bin/
|
|
|
|
# Add bash.
|
|
RUN apk add --no-cache \
|
|
bash
|
|
|
|
# Copy the entrypoint script.
|
|
COPY "docker/lnd/start-lnd.sh" .
|
|
RUN chmod +x start-lnd.sh
|