Edited;
Ok, I just managed to run the docker container conencted to the created networrk.
I had to run
$ docker rm bitcoind
$ docker run -it --network lnbook --name bitcoind lnbook/bitcoind
That's correct; even if you stopped the docker container, it still
'existed' and you therefore need to delete / remove it (rm).
If you followed the book step by step, I'd honestly consider this a 'bug' / error and would recommend to create an
issue with description and fix (those 2 terminal commands).
Yes maybe. I just need to fix another problem that just came up following this steps. But this is probably on my side.
After I wasa able to run the 2 containers connected to the same network, I tried to start the container for lnd but I failed to run the command correctly and got errors. Then, I spotted the problem and I ran the command with a small typo.
So, I run this:
$ docker pull lndbook/lnd
Using default tag: latest
Error response from daemon: pull access denied for lndbook/lnd, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
instead of running:
$ docker pull lnbook/lnd
Using default tag: latest
Error response from daemon: pull access denied for lndbook/lnd, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
It is a typo in
lnbook versus
lndbookSo, when I ran the wrong command and got that error, I went to search about that and end up finding another similar command in dockerhub. So I ran it:
$ docker pull lncm/lnd
Using default tag: latest
latest: Pulling from lncm/lnd
c9b1b535fdd9: Pull complete
b022e8c69823: Pull complete
be1ac9286ab7: Pull complete
3e9d70ec7fb9: Pull complete
35eacf42f633: Pull complete
ac7b308c590f: Pull complete
dc936d0a6ff0: Pull complete
Digest: sha256:971d6b7d7d98217aeb3142de50ec538dfaabcf31b33f16c5b7a4c5b56ab79ebb
Status: Downloaded newer image for lncm/lnd:latest
docker.io/lncm/lnd:latest
But then, when I tried to move on, I got errors. I skipped some of the output because it's too long. It starated well, but then...
$ docker build -t lncm/lnd lnd
Sending build context to Docker daemon 11.78kB
Step 1/36 : ARG OS=ubuntu
Step 2/36 : ARG OS_VER=focal
Step 3/36 : ARG GO_VER=1.13
Step 4/36 : FROM ${OS}:${OS_VER} as os
---> d5447fc01ae6
Step 5/36 : FROM golang:${GO_VER} as go
1.13: Pulling from library/golang
d6ff36c9ec48: Pull complete
c958d65b3090: Pull complete
edaf0a6b092f: Pull complete
80931cf68816: Pull complete
813643441356: Pull complete
799f41bb59c9: Pull complete
16b5038bccc8: Pull complete
...
...
...
get "golang.org/x/crypto/acme/autocert": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at //golang.org/x/crypto/acme/autocert?go-get=1
get "golang.org/x/crypto/acme/autocert": verifying non-authoritative meta tag
The command '/bin/sh -c mkdir -p ${GOPATH}/src && cd ${GOPATH}/src && go get -v -d github.com/lightningnetwork/lnd && cd ${GOPATH}/src/github.com/lightningnetwork/lnd && git checkout tags/${LND_VER} && make clean && make && make install' returned a non-zero code: 1
After this, I spotted the typo in my first command and I end up running it again but fixing the typo.
$ docker pull lnbook/lnd
Using default tag: latest
latest: Pulling from lnbook/lnd
35807b77a593: Already exists
ae922e9149d6: Already exists
54b0859e8891: Pull complete
6ec898f59cb9: Pull complete
30910091372f: Pull complete
fc2f3334d969: Pull complete
6c0a14290d9a: Pull complete
aac1c3f5cd1b: Pull complete
add701ef0271: Pull complete
bd9f43bdd10f: Pull complete
564e40e79828: Pull complete
c3a5779fc09f: Pull complete
3a956cdc95e8: Pull complete
376a33408dca: Pull complete
d6703385ffea: Pull complete
766fa2998f46: Pull complete
cfda81712259: Pull complete
Digest: sha256:ac176e7510c6a8a4e0174de4b334cfa2f004177b06e30234872e7d65f8227040
Status: Downloaded newer image for lnbook/lnd:latest
docker.io/lnbook/lnd:latest
But then, when I tried to run the next command from instructions. It starts well, but then:
$ docker build -t lnbook/lnd lnd
Sending build context to Docker daemon 11.78kB
Step 1/36 : ARG OS=ubuntu
Step 2/36 : ARG OS_VER=focal
Step 3/36 : ARG GO_VER=1.13
Step 4/36 : FROM ${OS}:${OS_VER} as os
---> d5447fc01ae6
Step 5/36 : FROM golang:${GO_VER} as go
---> d6f3656320fe
Step 6/36 : FROM os AS os-base
---> d5447fc01ae6
Step 7/36 : RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && apt-get install -yqq curl unzip jq bash-completion
---> Using cache
---> 2e87c33d44ed
Step 8/36 : FROM go as lnd-build
---> d6f3656320fe
Step 9/36 : ENV GO_VER=${GO_VER}
---> Using cache
---> 18cffc28743d
Step 10/36 : ENV GOPATH=/go
---> Using cache
---> d2bae344e1d9
Step 11/36 : ARG LND_VER=v0.13.1-beta
---> Using cache
---> 9a1f66f38512
Step 12/36 : ENV LND_VER=${LND_VER}
---> Using cache
---> 42d6b61dfec7
Step 13/36 : RUN mkdir -p ${GOPATH}/src && cd ${GOPATH}/src && go get -v -d github.com/lightningnetwork/lnd && cd ${GOPATH}/src/github.com/lightningnetwork/lnd && git checkout tags/${LND_VER} && make clean && make && make install
---> Running in 64d422918c9f
(AFTER THIS POINT ALL OUTPUT IS RED. NOT SURE IT IS SUPPOSED TO BE RED OR IF IT IS ALREADY A BAD SIGN)
github.com/lightningnetwork/lnd (download)
github.com/btcsuite/btcd (download)
github.com/decred/dcrd (download)
get "golang.org/x/crypto/sha3": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at //golang.org/x/crypto/sha3?go-get=1
...
...
get "golang.org/x/crypto/acme/autocert": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at //golang.org/x/crypto/acme/autocert?go-get=1
get "golang.org/x/crypto/acme/autocert": verifying non-authoritative meta tag
The command '/bin/sh -c mkdir -p ${GOPATH}/src && cd ${GOPATH}/src && go get -v -d github.com/lightningnetwork/lnd && cd ${GOPATH}/src/github.com/lightningnetwork/lnd && git checkout tags/${LND_VER} && make clean && make && make install' returned a non-zero code: 1
I skipped some of the red output because it is too long.
Now, I don't know if this is because I ran the other command and tried to run this command or if this is due to something else.
I think I'll simply delete all the lnbook folder and will try again, from the beginning.
Hi.
I started reading this book, written by Antonopoulos, Osuntokun and Pickardt, right at github,
here.
I have created this thread to ask questions about the contents of the book whenever I'm unable to understand a sentence, a subject, an example or watever question I may have.
If others also want to ask questions on top of my questions, feel free but I would like to keep the thread kind of limited to my questions and people's answers so that I don't lose focus on each question/answer.
I find this book very interesting based on its area of focus and am interested in this book reading it too and would love to follow up with you in this thread on future questions that might arise from you for more understanding. But I may not be putting down questions for the sake of not to intercept yours.
I think you can ask questions here if you're also reading the book. You are free to do so. I think we will manage a