add Dockerfile for running tests

This commit is contained in:
Sean Lavine 2015-06-26 14:26:50 -07:00
parent 4328a49b63
commit 6973183179
2 changed files with 21 additions and 0 deletions

View File

@ -3,3 +3,4 @@ test/
.project
.gitmodules
.travis.yml
Dockerfile

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM freewil/bitcoin-testnet-box
MAINTAINER Sean Lavine <lavis88@gmail.com>
# install node.js (sudo for bash needed?)
USER root
RUN apt-get install --yes curl
RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash -
RUN apt-get install --yes nodejs
# set permissions for tester user on project
ADD . /home/tester/node-bitcoin
RUN chown --recursive tester:tester /home/tester/node-bitcoin
# install module dependencies
USER tester
WORKDIR /home/tester/node-bitcoin
RUN npm install
# run test suite
CMD ["npm", "test"]