This instruction did not get updated when the docker-compose file removed the `alice` service. This changes makes it work and is consistent with the previous instructions.
Now that the official releases are built with subservers, can/should we build docker images with subservers by default too?
This one-line change is all I needed to do to build LND with subservers so loop would work with the docker image.
Currently, changing the source code causes the docker layer cache to break the caching of package installation (make, git, etc).
If we execute the source COPY command as an individual command, then rebuilds of the container will be much quicker.
It is better to replace bash shell with potentially long-running
last script command. This way the running command will receive all
potential unix process signals directly.
A concrete example which motivated this change:
Exec of btcd is needed for graceful shutdown of btcd during
`docker-compose down`. Docker Compose properly sends this signal to our
start-btcd.sh bash shell but it is not further signalled to the running
btcd process. Docker Compose then kills whole container forcefully after
some timeout.
An alternative solution would be to trap SIGTERM in our bash script and
forward it to running btcd. Which would be IMO ugly and error prone.
`lncli` command `walletbalance` apparently no longer supports the `--witness_only` argument. With the deprecated argument:
```
root@8a9ad8528430:/go/src/github.com/lightningnetwork/lnd# lncli walletbalance --witness_only=true
Incorrect Usage: flag provided but not defined: -witness_only
NAME:
lncli walletbalance - Compute and display the wallet's current balance
USAGE:
lncli walletbalance [arguments...]
[lncli] flag provided but not defined: -witness_only
```
After removing that argument:
```
root@8a9ad8528430:/go/src/github.com/lightningnetwork/lnd# lncli walletbalance
{
"total_balance": "1505000000000",
"confirmed_balance": "1505000000000",
"unconfirmed_balance": "0"
}
```
* Update go version for Docker `lnd` build
Per #815, https://github.com/lightningnetwork/lnd/blob/master/htlcswitch/circuit.go#L21 depends on go version >= 1.9
Before this change:
```
Building lnd
Step 1/11 : FROM golang:1.8
...
Step 9/11 : RUN go install . ./cmd/...
---> Running in 7f5d6ac430e5
# github.com/lightningnetwork/lnd/htlcswitch
htlcswitch/circuit.go:21: syntax error: unexpected = in type declaration
ERROR: Service 'lnd' failed to build: The command '/bin/sh -c go install . ./cmd/...' returned a non-zero code: 2
```
After:
```
Building lnd
Step 1/11 : FROM golang:1.9
1.9: Pulling from library/golang
3e731ddb7fc9: Pull complete
47cafa6a79d0: Pull complete
79fcf5a213c7: Pull complete
68e99216b7ad: Pull complete
9fc7abc9c77e: Pull complete
7fefae002ae5: Pull complete
7eef770e7cf3: Pull complete
fea064ba669b: Pull complete
Digest: sha256:caa4d6b6a468ffc4cc1f2d88cd95019bf057eb33bea1407dd55bd79755a26bb4
Status: Downloaded newer image for golang:1.9
---> 8ebf49f75a15
...
Step 9/11 : RUN go install . ./cmd/...
---> Running in ba871e58d517
Removing intermediate container ba871e58d517
---> fe16f8578770
Step 10/11 : COPY "docker/lnd/start-lnd.sh" .
...
---> 1f1d47432540
Successfully built 1f1d47432540
Successfully tagged lnd:latest
...
```
* Use latest go version 1.10
Pre review feedback, use the latest version of go.
In this commit we restore the prior workflow of the docker-compose set
up with have to allow developers to quickly erect an lnd+btcd instance.
In a recent change, we now prompt the user for a passphrase that will
be used to encrypt the wallet database. This affected the prior
workflow, as it assumed set up was non-interactive.
In this commit we restore the prior behavior as we now start the lnd
nodes with --noencryptwallet.
In this commit, we fix a lingering issue in the execution
of the lnd container, after the new macaroon based
authentication was added. With the new authentication
feature, if the datadir was changed, but `lncli` wasn't
updated to point to the macaroon path, then none of
the commands would work.
To fix this, we simply omit setting the data directory.