Skip to content

Commit

Permalink
dockerfile: add npm scripts to build and test
Browse files Browse the repository at this point in the history
* ijavascript-node-0.10: workaround removal of jessie-updates and
  jessie-backports.

* ijavascript-node-latest: replace ipython-notebook with jupyter-notebook.
  • Loading branch information
n-riesco committed Jun 23, 2019
1 parent 3b46971 commit d80522b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
"scripts": {
"doc": "python scripts/doc-build.py",
"doc:publish": "node scripts/doc-publish.js gh-pages https://github.com/n-riesco/ijavascript",
"docker:build:node:0.10": "docker build -f test/ijavascript-node-0.10/Dockerfile -t ijs-node-0.10 --no-cache .",
"docker:shell:node:0.10": "docker run --rm -ti ijs-node-0.10 /bin/bash",
"docker:test:node:0.10": "docker run --rm -ti ijs-node-0.10",
"docker:build:node:latest": "docker build -f test/ijavascript-node-latest/Dockerfile -t ijs-node-latest --no-cache .",
"docker:shell:node:latest": "docker run --rm -ti ijs-node-latest /bin/bash",
"docker:test:node:latest": "docker run --rm -ti ijs-node-latest",
"lint": "eslint bin lib test",
"test:ijskernel": "mocha test/ijskernel.js",
"test": "npm run lint && npm run test:ijskernel"
Expand Down
8 changes: 7 additions & 1 deletion test/ijavascript-node-0.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM node:0.10

# Removal of jessie-updates and jessie-backports from Debian mirrors
# https://www.lucas-nussbaum.net/blog/?p=947
RUN echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i "/deb http:\/\/deb.debian.org\/debian jessie-updates main/d" /etc/apt/sources.list
RUN echo "Acquire::Check-Valid-Until no;" > /etc/apt/apt.conf.d/99no-check-valid-until

RUN apt-get update && \
apt-get install -yq --no-install-recommends libzmq3-dev ipython-notebook && \
apt-get clean
Expand All @@ -12,4 +18,4 @@ RUN cd ijavascript && rm -rf node_modules && npm i --production

WORKDIR ijavascript

CMD npm run test
CMD npm install && npm run test
4 changes: 2 additions & 2 deletions test/ijavascript-node-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:latest

RUN apt-get update && \
apt-get install -yq --no-install-recommends libzmq3-dev ipython-notebook && \
apt-get install -yq --no-install-recommends libzmq3-dev jupyter-notebook && \
apt-get clean

RUN mkdir -p ijavascript
Expand All @@ -12,4 +12,4 @@ RUN cd ijavascript && rm -rf node_modules && npm i --production

WORKDIR ijavascript

CMD npm run test
CMD npm install && npm run test

0 comments on commit d80522b

Please sign in to comment.