simplify tags and Dockerfile name
This commit is contained in:
parent
cf68868bf8
commit
1eddbd86a3
6 changed files with 15 additions and 13 deletions
|
@ -11,7 +11,10 @@ COPY ./stuff/start.sh start
|
||||||
COPY ./stuff/healthcheck.sh healthcheck
|
COPY ./stuff/healthcheck.sh healthcheck
|
||||||
COPY ./stuff/advance_blocks.sh advance
|
COPY ./stuff/advance_blocks.sh advance
|
||||||
COPY ./stuff/fix-permissions.c fix-permissions.c
|
COPY ./stuff/fix-permissions.c fix-permissions.c
|
||||||
RUN curl --progress-bar -L -o ./lbrycrd-linux.zip $(curl -s https://api.github.com/repos/lbryio/lbrycrd/releases | grep -F 'lbrycrd-linux' | grep download | head -n 1 | cut -d'"' -f4) && \
|
ARG release_url
|
||||||
|
# require that release_url is set
|
||||||
|
RUN test -n "$release_url"
|
||||||
|
RUN curl --progress-bar -L -o ./lbrycrd-linux.zip "$release_url" && \
|
||||||
unzip ./lbrycrd-linux.zip && \
|
unzip ./lbrycrd-linux.zip && \
|
||||||
gcc fix-permissions.c -o fix-permissions && \
|
gcc fix-permissions.c -o fix-permissions && \
|
||||||
chmod +x ./lbrycrdd ./lbrycrd-cli ./lbrycrd-tx ./start ./healthcheck ./fix-permissions ./advance
|
chmod +x ./lbrycrdd ./lbrycrd-cli ./lbrycrd-tx ./start ./healthcheck ./fix-permissions ./advance
|
|
@ -1,8 +1,5 @@
|
||||||
# lbrycrd
|
# lbrycrd Docker image
|
||||||
# Docker image tags
|
`
|
||||||
`lbry/lbrycrd`
|
|
||||||
`[linux-x86_64-production](https://github.com/lbryio/lbry-docker/blob/master/lbrycrd/Dockerfile-linux-x86_64-production)` (Latest release)
|
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -31,18 +28,18 @@ mounted config file exists, these variables are used to create a fresh config.
|
||||||
Running the default configuration:
|
Running the default configuration:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run --rm -it -e RUN_MODE=default -e SNAPSHOT_URL="https://lbry.com/snapshot/blockchain" lbry/lbrycrd:linux-x86_64-production
|
docker run --rm -it -e RUN_MODE=default -e SNAPSHOT_URL="https://lbry.com/snapshot/blockchain" lbry/lbrycrd:latest-release
|
||||||
```
|
```
|
||||||
|
|
||||||
Running with RPC password changed:
|
Running with RPC password changed:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run --rm -it -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:linux-x86_64-production
|
docker run --rm -it -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:latest-release
|
||||||
```
|
```
|
||||||
|
|
||||||
Running with a config file but with the RPC password still overridden:
|
Running with a config file but with the RPC password still overridden:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run --rm -it -v /path/to/lbrycrd.conf:/etc/lbry/lbrycrd.conf -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:linux-x86_64-production
|
docker run --rm -it -v /path/to/lbrycrd.conf:/etc/lbry/lbrycrd.conf -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:latest-release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ services:
|
||||||
lbrycrd:
|
lbrycrd:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-linux-x86_64-production
|
dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "11336:29246"
|
- "11336:29246"
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
## Lbrycrd ##
|
## Lbrycrd ##
|
||||||
#############
|
#############
|
||||||
lbrycrd:
|
lbrycrd:
|
||||||
image: lbry/lbrycrd:linux-x86_64-production
|
image: lbry/lbrycrd:latest-release
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "11336:9246"
|
- "11336:9246"
|
||||||
|
|
|
@ -27,5 +27,7 @@ fi
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
docker build -t "lbry/lbrycrd:${docker_tag}" -f Dockerfile-linux-x86_64-production "$DIR"
|
release_url=$(curl -s https://api.github.com/repos/lbryio/lbrycrd/releases | grep -F 'lbrycrd-linux' | grep download | head -n 1 | cut -d'"' -f4)
|
||||||
|
|
||||||
|
docker build --build-arg "release_url=$release_url" --tag "lbry/lbrycrd:${docker_tag}" -f Dockerfile "$DIR"
|
||||||
docker push "lbry/lbrycrd:${docker_tag}"
|
docker push "lbry/lbrycrd:${docker_tag}"
|
||||||
|
|
|
@ -68,7 +68,7 @@ function download_snapshot() {
|
||||||
local url="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbry.com/snapshot/blockchain
|
local url="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbry.com/snapshot/blockchain
|
||||||
if [[ -n "$url" ]] && [[ ! -d ./.lbrycrd/blocks ]]; then
|
if [[ -n "$url" ]] && [[ ! -d ./.lbrycrd/blocks ]]; then
|
||||||
echo "Downloading blockchain snapshot from $url"
|
echo "Downloading blockchain snapshot from $url"
|
||||||
wget -O snapshot.tar.bz2 "$url"
|
wget --no-verbose -O snapshot.tar.bz2 "$url"
|
||||||
echo "Extracting snapshot..."
|
echo "Extracting snapshot..."
|
||||||
mkdir -p ./.lbrycrd
|
mkdir -p ./.lbrycrd
|
||||||
tar xvjf snapshot.tar.bz2 --directory ./.lbrycrd
|
tar xvjf snapshot.tar.bz2 --directory ./.lbrycrd
|
||||||
|
|
Loading…
Reference in a new issue