Skip to content

Commit 7ed580f

Browse files
author
Aaron Blankstein
authored
Merge pull request #1982 from blockstack/feat/net-test-docker
Add Dockerfile that can run net-test scripts
2 parents 26cf9a2 + a8a2457 commit 7ed580f

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM rust:buster
2+
3+
WORKDIR /src
4+
5+
COPY . .
6+
7+
RUN cd / && wget https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
8+
RUN cd / && tar -xvzf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
9+
10+
RUN ln -s /bitcoin-0.20.0/bin/bitcoind /bin/
11+
RUN ln -s /bitcoin-0.20.0/bin/bitcoin-cli /bin/
12+
13+
RUN apt-get update
14+
RUN apt-get install -y jq screen net-tools ncat
15+
16+
RUN cargo build --workspace
17+
18+
ENV PATH="/src/target/debug:/src/net-test/bin:${PATH}"
19+
20+
WORKDIR /src/net-test/bin
21+
RUN bash

net-test/bin/faucet.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ http_401() {
4343
http_500() {
4444
local ERR="$1"
4545
local ERR_LEN=${#ERR}
46+
log "500 error: ${ERR}"
4647
printf "HTTP/1.0 500 Internal Server error\r\nContent-Length: $ERR_LEN\r\nContent-Type: text/plain\r\n\r\n$ERR"
4748
}
4849

net-test/bin/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ start_bitcoind() {
6161
logln "ok"
6262

6363
log "Starting bitcoind..."
64-
bitcoind -conf="$BITCOIN_CONF" >"$BITCOIN_LOGFILE" 2>&1 &
64+
bitcoind -fallbackfee=0.0002 -conf="$BITCOIN_CONF" >"$BITCOIN_LOGFILE" 2>&1 &
6565
local BITCOIN_PID=$!
6666
logln "PID $BITCOIN_PID"
6767

0 commit comments

Comments
 (0)