Skip to content

Instantly share code, notes, and snippets.

@arshbot
Last active July 12, 2021 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arshbot/0f4a350da60261b5925e83f7aeeb938f to your computer and use it in GitHub Desktop.
Save arshbot/0f4a350da60261b5925e83f7aeeb938f to your computer and use it in GitHub Desktop.
building and running lnd quickly, see modified dockerfile
docker-compose build && docker-compose run --entrypoint "make itest icase=psbt" lnd
~~dev.DOCKERFILE~~
# 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.16.3-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 and install/build lnd.
RUN apk add --no-cache --update alpine-sdk \
git \
make
# Copy in the local repository to build from.
COPY . /go/src/github.com/lightningnetwork/lnd
RUN cd /go/src/github.com/lightningnetwork/lnd \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"
# 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
WORKDIR src/github.com/lightningnetwork/lnd/
#
# # Copy the entrypoint script.
# COPY "docker/lnd/start-lnd.sh" .
# RUN chmod +x start-lnd.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment