Skip to content

Commit

Permalink
Add docker env for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
puritys committed Jul 18, 2016
1 parent 715f001 commit 6bc0ee9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ deployPreTest:
sudo npm install -g
mocha tests/manualTest/global.sjs

dockerTestNode-6.3:
docker stop node-6.3 2>&1 || true
bash -c 'docker rm -f node-6.3' 2>&1 || true
docker run -d -t --name node-6.3 e0ccf8ebb48b /bin/bash
docker exec -i node-6.3 /usr/bin/git clone https://github.com/puritys/nodejs-phplike.git
docker exec -i node-6.3 bash -c 'cd nodejs-phplike/ && npm install --dev && make gyp && make test' | tee result.node-6.3



#npm adduser
#npm publish
Expand Down
8 changes: 8 additions & 0 deletions docker/node-6.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM nodesource/node:6.3

RUN apt-get update
RUN apt-get install libcurl4-gnutls-dev

COPY package.json /usr/src/app/
RUN npm install -g nan node-gyp bindings mocha

13 changes: 13 additions & 0 deletions docker/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "docker_web_app",
"version": "1.0.0",
"description": "Node.js on Docker",
"author": "First Last <first.last@example.com>",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.13.3"
}
}

0 comments on commit 6bc0ee9

Please sign in to comment.