forked from commerceblock/mainstay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.tests
More file actions
42 lines (35 loc) · 1.03 KB
/
Dockerfile.tests
File metadata and controls
42 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM golang:1.10.3-stretch
ENV PKG_VER 0.17.1
ENV PKG bitcoin-${PKG_VER}-x86_64-linux-gnu.tar.gz
ENV PKG_URL https://bitcoincore.org/bin/bitcoin-core-${PKG_VER}/${PKG}
COPY . $GOPATH/src/mainstay
RUN set -x \
&& apt update \
&& apt install -y libzmq3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
&& cd $GOPATH/src/mainstay \
&& go get ./... \
&& go get github.com/stretchr/testify/assert \
&& go build \
&& go install
RUN set -ex \
&& cd $HOME \
&& mkdir $HOME/.bitcoin \
&& printf '%s\n' '#!/bin/sh' 'rpcuser=user' \
'rpcpassword=pass' \
'rpcport=18443' \
'keypool=0' \
'deprecatedrpc=signrawtransaction' \
'server=1' \
'regtest=1' \
'daemon=1' \
'txindex=1' > ~/.bitcoin/bitcoin.conf \
&& wget ${PKG_URL} \
&& tar zxvf ${PKG} \
&& export PATH=$PATH:$HOME/bitcoin-${PKG_VER}/bin \
&& bitcoind \
&& /go/src/mainstay/scripts/run-tests.sh
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["mainstay"]