Introducing Docker
So, we've had a few heart-to-heart talks, and I've shared some hard truths with you.
The next step might be the hardest, but let me tell you, it will be worth it.
We're going to be using Docker to set up LND, and Bitcoin Core, and TOR.
Why are we using Docker?
When setting up a Lightning node, there are some seriously compelling reasons why you should use Docker:
- Your installation will be reproducible. If you need to move onto a different computer, it will be simple.
- You will avoid installing software and forgetting how or where you installed it, or how it could be removed.
- You will have built-in documentation, so you can always remember what you installed.
- You will be able to follow this guide on ANY mainstream Linux distribution. Docker runs on everything!
If you don't want to use Docker
Just believe me when I say: Once you learn Docker, you will never go back to installing software directly on your machine.
But: I must admit, there ARE guides which wil walk you through some of this same process, without Docker, such as the Minibolt Guide. (Careful, though, some of these guides might be outdated.)
What about Proxmox, Podman, or a Virtual Machine?
These are also good solutions.
But my experience is all with Docker, and Docker has so much infrastructure already built around it, that I can tell you for sure: Learning Docker is time well-spent, and once you know it well, you'll find that you have "magical powers" and will be able to safely install and use lots of very complicated (and beta!) software, which would otherwise give you problems.
So yeah, you need to learn Docker
If you are completely new to Docker, spend at least 2 to 3 hours watching docker tutorials.
Next, on your own computer, do a Docker Compose tutorial, for example this one.
Once you understand Docker, then Docker Compose isn't that complicated... it's basically a way to make pretty-looking .yaml
files -- simple configuration files -- such that these files can easily run several docker containers at the same time.
No, I'm serious, you need to learn Docker
Most importantly, you need a conceptual model in your mind of "how Docker works."
I don’t just want to shown you some Docker commands and have you copy & paste them into your editor.
You need to understand that Docker is like another computer running inside your computer.
This can be confusing, but is also the actual final solution of "conflicting environments" -- for example, two software packages trying to use different versions of Python, and other stuff like that.
Install Docker and Docker Compose
Install Docker and Docker Compose with these directions.
Now, give your user permissions to run docker, and reboot:
sudo usermod -aG docker $USER
sudo reboot
After you reboot, you can verify that Docker is working by running the hello-world
container
docker run hello-world