diff --git a/code/docker/bitcoind-base/Dockerfile b/code/docker/bitcoind-base/Dockerfile new file mode 100644 index 0000000..f18aa81 --- /dev/null +++ b/code/docker/bitcoind-base/Dockerfile @@ -0,0 +1,36 @@ +FROM ubuntu:18.04 + +# Install development tools prerequisites +RUN apt-get update && apt-get install -y \ + build-essential \ + libtool \ + autotools-dev \ + automake \ + pkg-config \ + python3 \ + wget \ + git \ + curl \ + unzip + +# Install additional Bitcoin Core (bitcoind) requirements +RUN apt-get install -y \ + libssl-dev \ + libevent-dev \ + bsdmainutils \ + libboost-system-dev \ + libboost-filesystem-dev \ + libboost-chrono-dev \ + libboost-test-dev \ + libboost-thread-dev \ + libminiupnpc-dev \ + libzmq3-dev + +# Install software-properties-common to add apt repositories +RUN apt-get install -y \ + software-properties-common + +# Add Bitcoin Core PPA repository +RUN add-apt-repository ppa:bitcoin/bitcoin +RUN apt-get update && apt-get install -y \ + bitcoind diff --git a/code/docker/bitcoind-regtest/Dockerfile b/code/docker/bitcoind-regtest/Dockerfile new file mode 100644 index 0000000..2e75622 --- /dev/null +++ b/code/docker/bitcoind-regtest/Dockerfile @@ -0,0 +1,16 @@ +FROM bitcoind_base:latest + +ADD bitcoind /bitcoind +WORKDIR /bitcoind +RUN ln -sf /dev/stdout /bitcoind/debug.log + +EXPOSE 12001 + + +CMD bitcoind -datadir=/bitcoind -daemon \ + && sleep 2 \ + && address=$(bitcoin-cli -datadir=/bitcoind getnewaddress) \ + && bitcoin-cli -datadir=/bitcoind generatetoaddress 101 $address \ + && while sleep 10 \ + ; do bitcoin-cli -datadir=/bitcoind generatetoaddress 1 $address \ + ; done diff --git a/code/docker/bitcoind-regtest/bitcoind/bitcoin.conf b/code/docker/bitcoind-regtest/bitcoind/bitcoin.conf new file mode 100644 index 0000000..2577ef0 --- /dev/null +++ b/code/docker/bitcoind-regtest/bitcoind/bitcoin.conf @@ -0,0 +1,15 @@ +regtest=1 +dnsseed=0 +upnp=0 +server=1 +debuglogfile=debug.log +debug=1 +printtoconsole=0 + +[regtest] +port=12000 +rpcport=12001 +rpcbind=0.0.0.0 +rpcallowip=0.0.0.0/0 +rpcuser=regtest +rpcpassword=regtest diff --git a/code/docker/c-lightning-base/Dockerfile b/code/docker/c-lightning-base/Dockerfile new file mode 100644 index 0000000..848cdba --- /dev/null +++ b/code/docker/c-lightning-base/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:18.04 + +# Install development tools prerequisites +RUN apt-get update && apt-get install -y \ + build-essential \ + libtool \ + autotools-dev \ + automake \ + pkg-config \ + python3 \ + wget \ + git \ + curl \ + unzip + + +# Install software-properties-common to add apt repositories +RUN apt-get install -y \ + software-properties-common + + +# c-lightning +RUN add-apt-repository -u ppa:lightningnetwork/ppa +RUN apt-get install -y \ + lightningd diff --git a/code/docker/devenv/Dockerfile b/code/docker/devenv/Dockerfile new file mode 100644 index 0000000..4896237 --- /dev/null +++ b/code/docker/devenv/Dockerfile @@ -0,0 +1,65 @@ +# syntax = docker/dockerfile:1.0-experimental +FROM ubuntu:18.04 + +# Install development tools prerequisites +RUN apt-get update && apt-get install -y \ + build-essential \ + libtool \ + autotools-dev \ + automake \ + pkg-config \ + python3 \ + wget \ + git \ + curl \ + unzip + +# Install additional Bitcoin Core (bitcoind) requirements +RUN apt-get install -y \ + libssl-dev \ + libevent-dev \ + bsdmainutils \ + libboost-system-dev \ + libboost-filesystem-dev \ + libboost-chrono-dev \ + libboost-test-dev \ + libboost-thread-dev \ + libminiupnpc-dev \ + libzmq3-dev + +# Install software-properties-common to add apt repositories +RUN apt-get install -y \ + software-properties-common + +# Add Bitcoin Core PPA repository +RUN add-apt-repository ppa:bitcoin/bitcoin +RUN apt-get update && apt-get install -y \ + bitcoind + + +# c-lightning +RUN add-apt-repository -u ppa:lightningnetwork/ppa +RUN apt-get install -y \ + lightningd + +# Go 1.13 for LND +RUN curl -SL https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ + | tar -xzC /usr/local +ENV PATH $PATH:/usr/local/go/bin +ENV GOPATH /gocode +RUN mkdir -p $GOPATH +ENV PATH $PATH:$GOPATH/bin + +# LND +RUN go get -d github.com/lightningnetwork/lnd +WORKDIR $GOPATH/src/github.com/lightningnetwork/lnd +RUN make && make install + +# OpenJDK11 for eclair +RUN apt install -y \ + openjdk-11-jdk + +# eclair-node +RUN mkdir -p /usr/src/eclair +WORKDIR /usr/src/eclair +RUN curl -SLO https://github.com/ACINQ/eclair/releases/download/v0.3.3/eclair-node-0.3.3-12ac145.jar diff --git a/code/docker/docker-compose/docker-compose.yml b/code/docker/docker-compose/docker-compose.yml new file mode 100644 index 0000000..8ca032b --- /dev/null +++ b/code/docker/docker-compose/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.3" +services: + bitcoind-regtest: + container_name: bitcoind-regtest + build: + context: ../bitcoind-regtest/. + dockerfile: ./Dockerfile + image: lnbook/bitcoind_regtest:latest + ports: + - "12001:12001" + lnd-run: + container_name: lnd-run + build: + context: ../lnd-run + dockerfile: ./Dockerfile + image: lnbook/lnd_run:latest diff --git a/code/docker/eclair-base/Dockerfile b/code/docker/eclair-base/Dockerfile new file mode 100644 index 0000000..558fdfa --- /dev/null +++ b/code/docker/eclair-base/Dockerfile @@ -0,0 +1,6 @@ +FROM openjdk:11 + +# eclair-node +RUN mkdir -p /usr/src/eclair +WORKDIR /usr/src/eclair +RUN curl -SLO https://github.com/ACINQ/eclair/releases/download/v0.3.3/eclair-node-0.3.3-12ac145.jar diff --git a/code/docker/lnd-base/Dockerfile b/code/docker/lnd-base/Dockerfile new file mode 100644 index 0000000..6754d4f --- /dev/null +++ b/code/docker/lnd-base/Dockerfile @@ -0,0 +1,8 @@ +FROM golang:1.13 + +WORKDIR /go/src/ + +# LND +RUN go get -d github.com/lightningnetwork/lnd +WORKDIR $GOPATH/src/github.com/lightningnetwork/lnd +RUN make && make install diff --git a/code/docker/lnd-run/Dockerfile b/code/docker/lnd-run/Dockerfile new file mode 100644 index 0000000..3b46f57 --- /dev/null +++ b/code/docker/lnd-run/Dockerfile @@ -0,0 +1,5 @@ +FROM lnbook/lnd_base + +ADD lnd /lnd + +CMD lnd --lnddir=/lnd diff --git a/code/docker/lnd-run/lnd/lnd.conf b/code/docker/lnd-run/lnd/lnd.conf new file mode 100644 index 0000000..e5067e7 --- /dev/null +++ b/code/docker/lnd-run/lnd/lnd.conf @@ -0,0 +1,16 @@ +[Application Options] +no-macaroons=1 +rpclisten=0.0.0.0:18001 +restlisten=0.0.0.0:18080 +listen=0.0.0.0:19735 +nobootstrap=1 +debug=1 + +[bitcoin] +bitcoin.active=1 +bitcoin.regtest=1 + +[bitcoind] +bitcoind.rpchost=localhost +bitcoind.rpcuser=regtest +bitcoind.rpcpass=regtest