github.com/decred/dcrlnd@v0.7.6/docs/DOCKER.md (about) 1 # Docker Instructions 2 3 ## Development/testing 4 5 For development or testing, or to spin up a `btcd` backend alongside `lnd`, 6 check out the documentation at [docker/README.md](../docker/README.md). 7 8 ## Production 9 10 To use Docker in a production environment, you can run `lnd` by first creating 11 a Docker container, adding the appropriate command-line options as parameters. 12 13 ``` 14 $ docker create --name=lnd lightninglabs/lnd [command-line options] 15 ``` 16 17 Then, just start the container: 18 19 ``` 20 $ docker start lnd 21 ``` 22 23 ## Volumes 24 25 A Docker volume will be created with your `.lnd` directory automatically, and will 26 persist through container restarts. 27 28 You can also optionally manually specify a local folder to be used as a volume: 29 30 ``` 31 $ docker create --name=lnd -v /media/lnd-docker/:/root/.lnd lightninglabs/lnd [command-line options] 32 ``` 33 34 ## Example 35 36 Here is an example testnet `lnd` that uses Neutrino: 37 38 ``` 39 $ docker create --name lnd-testnet lightninglabs/lnd --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community 40 ``` 41 42 Start the container: 43 44 ``` 45 $ docker start lnd-testnet 46 ``` 47 48 Create a wallet (and write down the seed): 49 50 ``` 51 $ docker exec -it lnd-testnet lncli create 52 ``` 53 54 Confirm `lnd` has begun to synchronize: 55 56 ``` 57 $ docker logs lnd-testnet 58 [snipped] 59 2018-05-01 02:28:01.201 [INF] RPCS: RPC server listening on 127.0.0.1:10009 60 2018-05-01 02:28:01.201 [INF] LTND: Waiting for chain backend to finish sync, start_height=2546 61 2018-05-01 02:28:01.201 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080 62 2018-05-01 02:28:08.999 [INF] LNWL: Caught up to height 10000 63 2018-05-01 02:28:09.872 [INF] DCRN: Processed 10547 blocks in the last 10.23s (height 10547, 2012-05-28 05:02:32 +0000 UTC) 64 ``` 65 66 This is a simple example, it is possible to use any command-line options necessary 67 to expose RPC ports, use `btcd` or `bitcoind`, or add additional chains.