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.
* 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.
Error `connection refused` was thrown when user tries to get "Alice" to
connect to "Bob" node due to port mismatch introduced in this change [1]
here.
This commit updates the port value to reflect the new change introduced in
[1].
Reference: [1]
72772ce4df
Chanes in this commit:
* Update references to old port value
* Omit specifying port during lncli connect
* Fix typo
This commit revamps the existing docker configuration to allow for
developer’s to easily bring up/down a Lightning Network testbed
environment.
Configuration related bugs within the prior swarm set up have been
fixed. The launched lnd nodes are now able to properly communicate with
the primary btcd node over RPC. The auto-generated RPC script has been
scrapped in favor of hard-coding a developer-only set of RPC
credentials. With this change, it’s now possible to add/remove
additional lnd nodes in order to test more complex scenarios.
Additionally, the containers now build off of the latest Go version
(1.7).
This commit adds two Dockerfiles, along with a docker-compose file
which links the two docker files together allowing for single-command
deployment.
Using the docker-compose file, two containers are deployed. One running
btcd, and the other running lnd. Both containers share the same shared
volume mounted to the file system in order to allow land to read btcd’s
certificates for the TLS RPC connections.
Additionally, the btcd instance comes will an automatic RPC
configuration generated allowing one to use btcctl out of the box via
calls to “docker-compose exec btcctl …”.