Browse Source

Initial commit

master
Luke Childs 4 years ago
commit
f40bcc8ef5
  1. 1
      .gitignore
  2. 22
      bitcoin.Dockerfile
  3. 23
      docker-compose.yml
  4. 19
      electrs.Dockerfile

1
.gitignore

@ -0,0 +1 @@
data

22
bitcoin.Dockerfile

@ -0,0 +1,22 @@
FROM debian:buster-slim
WORKDIR /build
RUN apt-get update
# Buildtime dependencies
RUN apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
# Runtime dependencies
RUN apt-get install -y libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev
# Clone source
RUN apt-get install -y git
RUN git clone --branch locations https://github.com/romanz/bitcoin.git .
# Build
RUN ./autogen.sh
RUN ./configure --disable-wallet --without-gui --without-miniupnpc
RUN make -j"$(($(nproc)+1))"
ENTRYPOINT ["/build/src/bitcoind"]

23
docker-compose.yml

@ -0,0 +1,23 @@
version: '3.7'
services:
bitcoin:
build:
context: .
dockerfile: bitcoin.Dockerfile
command: "-datadir=/data"
volumes:
- ./data/bitcoin:/data
network_mode: "host"
stop_grace_period: 15m
electrs:
build:
context: .
dockerfile: electrs.Dockerfile
command: "--network mainnet --db-dir /data --daemon-dir /bitcoin --low-memory"
restart: on-failure
volumes:
- ./data/bitcoin:/bitcoin:ro
- ./data/electrs:/data
network_mode: "host"
stop_grace_period: 5m

19
electrs.Dockerfile

@ -0,0 +1,19 @@
FROM debian:buster-slim
WORKDIR /build
RUN apt-get update
# Buildtime dependencies
RUN apt-get install -y cargo clang cmake libsnappy-dev
# Clone source
RUN apt-get install -y git
RUN git clone --branch next https://github.com/romanz/electrs .
# Build
RUN cargo build --release
STOPSIGNAL SIGINT
ENTRYPOINT ["/build/target/release/electrs_query"]
Loading…
Cancel
Save