rename alice/ to bitcoin/ && add liquid container

This commit is contained in:
altafan
2019-03-25 16:16:58 +01:00
parent 1d8d0f46f9
commit 87584f43e0
8 changed files with 60 additions and 44 deletions

View File

@@ -1,30 +0,0 @@
# bitcoin-box docker image
FROM ubuntu:18.04
# add bitcoind from the official PPA
# install bitcoind (from PPA) and make
RUN apt-get update && \
apt-get install --yes wget clang cmake jq software-properties-common && \
add-apt-repository --yes ppa:bitcoin/bitcoin && \
apt-get update && \
apt-get install --yes bitcoind
# install liquid
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
# copy the box files into the image
ADD alice/config /config
ADD alice/run /script
WORKDIR /script
# expose two rpc ports for the nodes to allow outside container access
EXPOSE 19001 18884
STOPSIGNAL SIGINT
CMD ["./run"]

23
bitcoin/Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# bitcoin-box docker image
FROM ubuntu:18.04
# add bitcoind from the official PPA
# install bitcoind (from PPA) and make
RUN apt-get update && \
apt-get install --yes clang cmake jq software-properties-common && \
add-apt-repository --yes ppa:bitcoin/bitcoin && \
apt-get update && \
apt-get install --yes bitcoind
RUN mkdir -p /config /script
# copy the box files into the image
ADD bitcoin/config /config
ADD bitcoin/run /script
WORKDIR /script
# expose two rpc ports for the nodes to allow outside container access
EXPOSE 19001
STOPSIGNAL SIGINT
CMD ["./run"]

View File

@@ -10,7 +10,6 @@ function clean {
trap clean SIGINT
bitcoind -datadir=/config &
liquidd -datadir=/config
sleep 10

View File

@@ -1,15 +1,9 @@
FROM rust:latest
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y clang cmake
RUN apt-get update && apt-get install --yes wget
WORKDIR /build
RUN wget -qO- https://github.com/vulpemventures/electrs/releases/download/v0.4.1-bin/electrs.tar.gz | tar -xvz && rm -rf electrs.tar.gz
RUN ls
# RUN git clone https://github.com/blockstream/electrs
# WORKDIR /home/user/electrs
# RUN git checkout new-index
# RUN cargo build --release
WORKDIR /scripts

21
liquid/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM ubuntu:18.04
RUN apt-get update && apt-get install --yes 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
ADD liquid/config /config
ADD liquid/run /script
WORKDIR /script
EXPOSE 18884
STOPSIGNAL SIGINT
CMD ["./run"]

View File

@@ -5,16 +5,14 @@ rpcport=18884
port=18886
# Over p2p we will only connect to local other liquidd
connect=localhost:18887
# connect=localhost:18887
regtest=1
daemon=1
# Make sure you set listen after -connect, otherwise neither
# will accept incoming connections!
listen=1
# Just for looking at random txs
txindex=1
txindex=0
# enable to allow non-localhost RPC connections
# recommended to change to a subnet, such as your LAN
@@ -34,12 +32,13 @@ rpcallowip=0.0.0.0/0
# We want to validate pegins by checking with bitcoind if header exists
# in best known chain, and how deep. We combine this with pegin
# proof included in the pegin to get full security.
validatepegin=1
validatepegin=0
# If in the same datadir and using standard ports, these are unneeded
# thanks to cookie auth. If not, like in our situation, liquidd needs
# more info to connect to bitcoind:
mainchainrpcport=19001
mainchainrpchost=10.10.0.10
mainchainrpcuser=admin1
mainchainrpcpassword=123

10
liquid/run Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -e
function clean {
kill -9 $(pidof liquidd)
}
trap clean SIGINT
liquidd -datadir=/config &
wait $!