From e109044748e361a68b26f47b590ae9fea763170d Mon Sep 17 00:00:00 2001 From: Chris Gorgolewski Date: Thu, 12 Oct 2017 11:51:17 +0800 Subject: [PATCH 1/3] added dockerfile --- .dockerignore | 3 +++ Dockerfile | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..2db93a849 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +tests +.git +node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..fc905fdc7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:trusty + +## Install the validator +RUN apt-get update && \ + apt-get install -y curl && \ + curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ + apt-get remove -y curl && \ + apt-get install -y nodejs && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +COPY . /src + +RUN npm install -g /src + +ENTRYPOINT /usr/bin/bids-validator \ No newline at end of file From d697e2cdf83e89cd194b47a338d13fe9bc6dcb56 Mon Sep 17 00:00:00 2001 From: Chris Gorgolewski Date: Thu, 12 Oct 2017 12:00:03 +0800 Subject: [PATCH 2/3] added mention to the readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a1d67bf2f..1b1986c8d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ If the validator seems to be working longer than couple of minutes please open [ 1. Install [Node.js](https://nodejs.org) (at least version 4.4.4) 1. From a terminal run `npm install -g bids-validator` 1. Run `bids-validator` to start validating datasets. +1. Docker + 1. Install Docker + 1. From a terminal run `docker run -ti --rm -v /path/to/data:/data:ro bids/validator /data` ## Support From 06714597eda6e60b44405ffc63ab85d87a73c4bb Mon Sep 17 00:00:00 2001 From: Chris Gorgolewski Date: Thu, 12 Oct 2017 12:02:19 +0800 Subject: [PATCH 3/3] newlines --- .dockerignore | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 2db93a849..3c67b0a1b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ tests .git -node_modules \ No newline at end of file +node_modules diff --git a/Dockerfile b/Dockerfile index fc905fdc7..3764c3d5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ COPY . /src RUN npm install -g /src -ENTRYPOINT /usr/bin/bids-validator \ No newline at end of file +ENTRYPOINT /usr/bin/bids-validator