2019-04-24 17:33:35 +02:00
|
|
|
# lbrynet
|
2019-04-27 23:17:37 +02:00
|
|
|
# Docker image tags
|
|
|
|
`lbry/lbrycrd`
|
2019-04-27 23:52:39 +02:00
|
|
|
`[linux-x86_64-production](https://github.com/lbryio/lbry-docker/blob/master/chainquery/Dockerfile-linux-x86_64-production)` (Latest release)
|
2018-06-01 02:17:04 +02:00
|
|
|
|
2019-04-25 16:15:14 +02:00
|
|
|
## Compiler container
|
2018-06-01 02:17:04 +02:00
|
|
|
|
2019-04-26 02:41:42 +02:00
|
|
|
The [Dockerfile-linux-multiarch-compiler](Dockerfile-linux-multiarch-compiler) is for building lbrynet for any architecture supported
|
2019-04-25 16:15:14 +02:00
|
|
|
by an Ubuntu 18.04 base image.
|
2018-06-01 02:17:04 +02:00
|
|
|
|
2019-04-25 16:15:14 +02:00
|
|
|
### Register qemu to run docker images built for platforms other than your host
|
2018-06-01 02:17:04 +02:00
|
|
|
|
2019-04-24 17:33:35 +02:00
|
|
|
```
|
2019-04-25 16:15:14 +02:00
|
|
|
docker run --rm --privileged multiarch/qemu-user-static:register
|
2019-04-24 17:33:35 +02:00
|
|
|
```
|
2018-09-30 22:47:40 +02:00
|
|
|
|
2019-04-25 16:15:14 +02:00
|
|
|
### Build for the default x86_64 platform:
|
2018-11-29 21:01:58 +01:00
|
|
|
|
2019-04-24 17:33:35 +02:00
|
|
|
```
|
2019-04-26 02:41:42 +02:00
|
|
|
docker build -t lbrynet -f Dockerfile-linux-multiarch-compiler .
|
2019-04-25 16:15:14 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Build for an ARM 32-bit platform:
|
|
|
|
|
|
|
|
```
|
2019-04-26 02:41:42 +02:00
|
|
|
docker build -t lbrynet-armhf -f Dockerfile-linux-multiarch-compiler --build-arg BASE_IMAGE=multiarch/ubuntu-core:armhf-bionic .
|
2019-04-25 16:15:14 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Build for an ARM 64-bit platform:
|
|
|
|
|
|
|
|
```
|
2019-04-26 02:41:42 +02:00
|
|
|
docker build -t lbrynet-arm64 -f Dockerfile-linux-multiarch-compiler --build-arg BASE_IMAGE=multiarch/ubuntu-core:arm64-bionic .
|
2019-04-24 17:33:35 +02:00
|
|
|
```
|
2019-04-27 22:44:12 +02:00
|
|
|
|
|
|
|
### Extra build arguments
|
|
|
|
|
|
|
|
#### VERSION
|
|
|
|
|
|
|
|
Compile any version of lbrynet by specifying the git tag:
|
|
|
|
|
2019-06-14 17:00:22 +02:00
|
|
|
VERSION can be any git reference. Examples:
|
|
|
|
|
|
|
|
* master
|
|
|
|
* v0.37.2
|
|
|
|
* 588568752b983f46f8f492d4bd5d76feeb74dfbf
|
|
|
|
|
2019-04-27 22:44:12 +02:00
|
|
|
```
|
|
|
|
docker build -t lbrynet:v0.36.0 --build-arg VERSION=v0.36.0 -f Dockerfile-linux-multiarch-compiler .
|
|
|
|
```
|
|
|
|
|
2019-06-14 17:00:22 +02:00
|
|
|
### REPO
|
|
|
|
|
|
|
|
Compile from any fork of lbrynet:
|
|
|
|
|
|
|
|
```
|
|
|
|
docker build -t lbrynet:v0.37.2-enigmacurry --build-arg VERSION=v0.37.2 \
|
|
|
|
--build-arg REPO=https://github.com/EnigmaCurry/lbry.git -f Dockerfile-linux-multiarch-compiler .
|
|
|
|
```
|
|
|
|
|
2019-04-27 22:44:12 +02:00
|
|
|
### Running from the compiler container directly
|
|
|
|
|
|
|
|
The container requires a home directory to be mounted at `/home/lbrynet`. This
|
|
|
|
is to ensure that the wallet is backed up to a real storage device. You must run
|
|
|
|
the container with the appropriate volume argument, or else lbrynet will refuse
|
2019-04-27 23:17:37 +02:00
|
|
|
to run.
|
2019-04-27 22:44:12 +02:00
|
|
|
|
2019-06-17 23:15:46 +02:00
|
|
|
The config file must be mounted at `/etc/lbry/daemon_settings.yml`.
|
|
|
|
|
|
|
|
If you compiled lbrynet as above, with the tag `lbrynet:v0.37.2`, you could run
|
2019-04-27 22:44:12 +02:00
|
|
|
docker like so:
|
|
|
|
|
|
|
|
```
|
2019-06-17 23:15:46 +02:00
|
|
|
docker run --rm -it -v wallet:/home/lbrynet -v /path/to/daemon_settings.yml:/etc/lbry/daemon_settings.yml lbrynet:v0.37.2 lbrynet start
|
2019-04-27 22:44:12 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
This automatically creates a docker volume called `wallet` and it will persist
|
|
|
|
across container restarts. See more in the [Docker volume
|
|
|
|
documentation](https://docs.docker.com/storage/volumes/)
|
2019-06-14 16:52:42 +02:00
|
|
|
|
|
|
|
If you would rather not use a docker volume, you can mount a directory
|
|
|
|
from your host instead:
|
|
|
|
|
|
|
|
```
|
2019-06-17 23:15:46 +02:00
|
|
|
docker run --rm -it -v /path/on/your/host:/home/lbrynet -v /path/to/daemon_settings.yml:/etc/lbry/daemon_settings.yml lbrynet:v0.37.2 lbrynet start
|
2019-06-14 16:52:42 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Either way, the container uses the configuration from `/home/lbrynet` inside the container.
|
|
|
|
|