Adds VERSION ARG to the lbrynet compiler and adds more README.
This commit is contained in:
parent
4580d06102
commit
7c6f0b58a1
2 changed files with 32 additions and 2 deletions
|
@ -39,9 +39,11 @@ RUN apt-get update && \
|
|||
|
||||
FROM dependencies as compile
|
||||
|
||||
ARG VERSION=master
|
||||
RUN python3.7 -m pip install -U pyinstaller && \
|
||||
git clone https://github.com/lbryio/lbry.git --depth 1 /lbry
|
||||
WORKDIR /lbry
|
||||
git clone https://github.com/lbryio/lbry.git /lbry && \
|
||||
git -C /lbry checkout ${VERSION}
|
||||
WORKDIR /lbry
|
||||
RUN git clone https://github.com/lbryio/torba.git --depth 1 /lbry/torba
|
||||
WORKDIR /lbry/torba
|
||||
RUN python3.7 -m pip install -e .
|
||||
|
|
|
@ -28,3 +28,31 @@ docker build -t lbrynet-armhf -f Dockerfile-linux-multiarch-compiler --build-arg
|
|||
```
|
||||
docker build -t lbrynet-arm64 -f Dockerfile-linux-multiarch-compiler --build-arg BASE_IMAGE=multiarch/ubuntu-core:arm64-bionic .
|
||||
```
|
||||
|
||||
### Extra build arguments
|
||||
|
||||
#### VERSION
|
||||
|
||||
Compile any version of lbrynet by specifying the git tag:
|
||||
|
||||
```
|
||||
docker build -t lbrynet:v0.36.0 --build-arg VERSION=v0.36.0 -f Dockerfile-linux-multiarch-compiler .
|
||||
```
|
||||
|
||||
### 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
|
||||
to run.
|
||||
|
||||
If you compiled lbrynet as above, with the tag `lbrynet-x86`, you could run
|
||||
docker like so:
|
||||
|
||||
```
|
||||
docker run --rm -it -v wallet:/home/lbrynet lbrynet-x86 lbrynet start
|
||||
```
|
||||
|
||||
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/)
|
||||
|
|
Loading…
Reference in a new issue