Skip to content

Instantly share code, notes, and snippets.

@arshbot
Last active December 2, 2021 01:03
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/444ff29e94f581374a9b962c8c730a67 to your computer and use it in GitHub Desktop.
Save arshbot/444ff29e94f581374a9b962c8c730a67 to your computer and use it in GitHub Desktop.
# 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.17.1-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"
# # Add bash.
RUN apk add --no-cache \
bash
WORKDIR src/github.com/lightningnetwork/lnd/
#!/usr/bin/bash
# whatever the itest is called, snake case
# make itest icase=disable;
make itest
# prints logs for every node
for log in lntest/itest/.logs-tranche0/*; do cat $log | while read line; do echo "[${log}] ${line}"; done; done;
  1. add dev.Dockerfile to /lnd
  2. add entrypoint.sh to /lnd/docker
  3. pick random itest in /lnd/itest to modify
  4. in entrypoint.sh, replace make itest with make itest icase=$NAME_OF_ITEST_SNAKE_CASE;
  5. run the shits
docker-compose build && docker-compose run --entrypoint "bash ./docker/entrypoint.sh" lnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment