From bdd99bcedf495da46c6743c70409811641cf86ae Mon Sep 17 00:00:00 2001 From: m-baumgartner Date: Mon, 19 Oct 2015 22:32:31 +0200 Subject: [PATCH 1/2] add dockerfile --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0053db33 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# Pull base image +FROM node:0.12.7 + +# Install Aglio +RUN npm install -g aglio@latest + + +ENTRYPOINT ["aglio"] From df9e072649973574ee6ada3cc7ac6c2aa1b4c745 Mon Sep 17 00:00:00 2001 From: m-baumgartner Date: Mon, 19 Oct 2015 22:43:12 +0200 Subject: [PATCH 2/2] Add docker container help --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8515dc64..3ed2afb4 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ For tools that do not support this include directive it will just render out as # Installation & Usage -There are two ways to use aglio: as an executable or as a library for Node.js. +There are three ways to use aglio: as an executable, in a docker container or as a library for Node.js. ## Executable Install aglio via NPM. You need Node.js installed and you may need to use `sudo` to install globally: @@ -83,6 +83,14 @@ aglio --include-path /path/to/includes -i - -o output.html # Output verbose error information with stack traces aglio -i input.apib -o output.html --verbose ``` +## With docker +You can choose to use the provided docker fly to build yourself a repeatable and testes environement. +To do so, go through the following steps : + +1. Build the image with `docker build` +2. Run aglio inside a container with `docker run` + You can use the `-v` switch to dynamically mount the folder that holds your API blueprint. + ## Node.js Library You can also use aglio as a library. First, install and save it as a dependency: