Install Docker
Add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Update package database from the newly added repo
sudo apt-get update
Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo
apt-cache policy docker-ce
Install Docker
sudo apt-get install -y docker-ce
Check that it’s running:
sudo systemctl status docker
List containers Restart a container
sudo docker ps -a sudo docker start -ai xyz1b9x874k8z734x
Start syncing Bitcoin chain
Clone a repository from github
git clone https://github.com/dougvk/lightning-node.git
Build the bitcoind docker image
cd lightning-node docker build . -t dougvk/bitcoind
Run bitcoind node (may take hours to sync up)
mkdir -p /scratch/bitcoin/mainnet/bitcoind docker run --name bitcoind_mainnet -d -v /scratch/bitcoin/mainnet/bitcoind:/data -p 8333:8333 -p 9735:9735 dougvk/bitcoind:latest