Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lncm/docker-lnd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-lnd

Build Status

This Dockerfile is based on the Dockerfile officially provided within the lnd repo.

The changes from upstream include:

  • exact versions of base images specified,
  • make replaced with naked go build,
  • apk add removed from the final stage of the build to make cross-compilation possible,
  • maintainer label added.

Tags

  • latest, 0.5.2 - currently latest version of lnd for both arm and amd64
  • 0.5.2-linux-arm - LND version 0.5.2 for arm architecture, built on Travis (log)
  • 0.5.2-linux-amd64 - LND version 0.5.2 for amd64 architecture, built on Travis (log)

Usage

Pull

First pull the image from Docker Hub:

docker pull lncm/lnd:0.5.2

NOTE: Running above will automatically choose native architecture of your CPU.

Start

Then to start lnd, execute:

docker run -it --rm \
    -v ~/.lnd:/root/.lnd \
    -p 9735:9735 \
    -p 10009:10009 \
    --name lnd \
    --detach \
    lncm/lnd:0.5.2

That will run lnd such that:

  • all data generated by the container is stored in ~/.lnd on your host machine,
  • port 9735 will be reachable for the peer-to-peer communication,
  • port 10009 will be reachable for the RPC communication,
  • created container will get named lnd,
  • that command will run the container in the background and print the ID of the container being run.

Interact

To issue any commands to a running container, do:

docker exec -it lnd BINARY COMMAND

Where:

  • BINARY is either lnd or lncli, and
  • COMMAND is something you'd normally pass to the binary

Examples:

docker exec -it lnd lnd --help
docker exec -it lnd lnd --version
docker exec -it lnd lncli --help
docker exec -it lnd lncli getinfo
docker exec -it lnd lncli getnetworkinfo

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •