-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (27 loc) · 1.08 KB
/
Dockerfile
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
# cryptochain/bitcoin-regtest docker image
# Ubuntu 14.04 LTS (Trusty Tahr)
FROM ubuntu:14.04
MAINTAINER Sean Lavine <[email protected]>
MAINTAINER Dmitry Ananichev <[email protected]>
# add bitcoind from the official PPA
RUN apt-get update
RUN apt-get install --yes software-properties-common
RUN add-apt-repository --yes ppa:bitcoin/bitcoin
RUN apt-get update
# install bitcoind (from PPA) and make
RUN apt-get install --yes bitcoind make
# create a non-root user
RUN adduser --disabled-login --gecos "" tester
# run following commands from user's home directory
WORKDIR /home/tester
# copy the testnet-box files into the image
ADD . /home/tester/bitcoin-testnet-box
# make tester user own the bitcoin-testnet-box
RUN chown -R tester:tester /home/tester/bitcoin-testnet-box
# use the tester user when running the image
USER tester
# run commands from inside the testnet-box directory
WORKDIR /home/tester/bitcoin-testnet-box
# expose two rpc ports for the nodes to allow outside container access
EXPOSE 19001 19011
CMD ["bitcoind", "-datadir=/home/tester/bitcoin-testnet-box/1", "--printtoconsole"]