diff --git a/alice/Dockerfile b/alice/Dockerfile deleted file mode 100644 index f666472..0000000 --- a/alice/Dockerfile +++ /dev/null @@ -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"] diff --git a/bitcoin/Dockerfile b/bitcoin/Dockerfile new file mode 100644 index 0000000..2f47f55 --- /dev/null +++ b/bitcoin/Dockerfile @@ -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"] diff --git a/alice/config/bitcoin.conf b/bitcoin/config/bitcoin.conf similarity index 100% rename from alice/config/bitcoin.conf rename to bitcoin/config/bitcoin.conf diff --git a/alice/run b/bitcoin/run similarity index 86% rename from alice/run rename to bitcoin/run index 4903383..7bb4129 100755 --- a/alice/run +++ b/bitcoin/run @@ -10,7 +10,6 @@ function clean { trap clean SIGINT bitcoind -datadir=/config & -liquidd -datadir=/config sleep 10 diff --git a/electrs/Dockerfile b/electrs/Dockerfile index ba74083..439b855 100644 --- a/electrs/Dockerfile +++ b/electrs/Dockerfile @@ -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 diff --git a/liquid/Dockerfile b/liquid/Dockerfile new file mode 100644 index 0000000..f2168a5 --- /dev/null +++ b/liquid/Dockerfile @@ -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"] diff --git a/alice/config/liquid.conf b/liquid/config/liquid.conf similarity index 94% rename from alice/config/liquid.conf rename to liquid/config/liquid.conf index 862ae5a..2528ca0 100644 --- a/alice/config/liquid.conf +++ b/liquid/config/liquid.conf @@ -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 diff --git a/liquid/run b/liquid/run new file mode 100755 index 0000000..864f3b3 --- /dev/null +++ b/liquid/run @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +function clean { + kill -9 $(pidof liquidd) +} +trap clean SIGINT + +liquidd -datadir=/config & +wait $! \ No newline at end of file