diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..4320a7e5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:5 + +RUN npm install -g grunt-cli bower + +WORKDIR /opt/querybuilder +ADD package.json bower.json /opt/querybuilder/ +RUN npm install && bower install --allow-root + +ADD . /opt/querybuilder + +ENTRYPOINT ["grunt", "test", "default"] diff --git a/README.md b/README.md index 6798d48e..0f3b06f9 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,14 @@ grunt --languages=fr,it * `grunt serve` to open the example page with automatic build and livereload. * `grunt doc` to generate the documentation. +#### Build using Docker +In case docker is available following commands can be used to build. + +* `docker build . -t querybuilder` to create the base image (needs to be called only once or on package/bower.json changes) +* `docker run --rm -iv$PWD/dist:/opt/querybuilder/dist -v$PWD/src:/opt/querybuilder/src querybuilder` to build the + +Its possible to just add explained options to the end of the docker run command. ## License This library is available under the MIT license.