mirror of
https://github.com/aljazceru/nigiri.git
synced 2026-02-23 07:14:29 +01:00
refactor liquid to install latest release
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && apt-get install --yes wget
|
||||
RUN apt-get update && apt-get install --yes curl wget
|
||||
|
||||
RUN mkdir -p /tmp && wget -qO- https://github.com/Blockstream/liquid/releases/download/liquid.3.14.1.22/liquid-3.14.1.22-x86_64-linux-gnu.tar.gz | tar xvz -C /tmp && \
|
||||
mv /tmp/liquid-3.14.1.22/bin/liquidd /usr/bin/liquidd && \
|
||||
mv /tmp/liquid-3.14.1.22/bin/liquid-cli /usr/bin/liquid-cli &&\
|
||||
mv /tmp/liquid-3.14.1.22/bin/liquid-tx /usr/bin/liquid-tx &&\
|
||||
rm -rf /tmp/liquid-3.14.1.22
|
||||
|
||||
RUN mkdir -p /config /script
|
||||
RUN mkdir -p /tmp /config /script
|
||||
|
||||
ADD liquid/config /config
|
||||
ADD liquid/run /script
|
||||
ADD liquid/script /script
|
||||
|
||||
WORKDIR /script
|
||||
|
||||
RUN /script/install
|
||||
|
||||
EXPOSE 18884
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
|
||||
13
liquid/script/install
Executable file
13
liquid/script/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
LATEST_VERSION=$(curl --silent "https://api.github.com/repos/blockstream/liquid/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
VERSION_NAME=$(echo $LATEST_VERSION | sed '1,/\./s/\./\-/')
|
||||
|
||||
wget -qO- https://github.com/Blockstream/liquid/releases/download/$LATEST_VERSION/$VERSION_NAME-x86_64-linux-gnu.tar.gz | tar xvz -C /tmp
|
||||
|
||||
mv /tmp/$VERSION_NAME/bin/liquidd /usr/bin/liquidd
|
||||
mv /tmp/$VERSION_NAME/bin/liquid-cli /usr/bin/liquid-cli
|
||||
mv /tmp/$VERSION_NAME/bin/liquid-tx /usr/bin/liquid-tx
|
||||
|
||||
rm -rf /tmp
|
||||
Reference in New Issue
Block a user