Merge pull request #164 from aantonop/devenv

WIP: Development Environment: Docker and docker-compose setup
pull/236/head
Andreas M. Antonopoulos 4 years ago committed by GitHub
commit 307ebf8113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -0,0 +1,5 @@
FROM lnbook/lnd_base
ADD lnd /lnd
CMD lnd --lnddir=/lnd

@ -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
Loading…
Cancel
Save