From 5e6f6fff0377a673ddfc8146ede34aa96c40b6a9 Mon Sep 17 00:00:00 2001 From: Dave Oram Date: Tue, 27 Nov 2018 20:36:06 +1300 Subject: [PATCH] Feature/dockerize redoc cli (#614) * Docker container to run redoc-cli * Dockerfile to package the 'redoc-cli' tool as a docker image * Revert "Dockerfile to package the 'redoc-cli' tool as a docker image" This reverts commit fec72ac0ea674b9d0dfc13bf2d9060241f617078. * Dockerfile to package the 'redoc-cli' tool as a docker image * Fixed with help from RomanGotsiy & xxxcoltxxx --- cli/Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cli/Dockerfile diff --git a/cli/Dockerfile b/cli/Dockerfile new file mode 100644 index 00000000..2544f547 --- /dev/null +++ b/cli/Dockerfile @@ -0,0 +1,23 @@ +# Package the 'redoc-cli' as a docker image. +# +# To build: +# $ cd +# $ docker build -t redoc-cli -f cli/Dockerfile . +# +# To run: +# To display the command line options: +# $ docker run --rm -it redoc-cli --help +# .. will display the comand line help +# +# To turn `swagger.yml` file in the current directory, to html documentation 'redoc-static.html' +# $ docker run --rm -it -v $PWD:/data redoc-cli bundle swagger.yml + +FROM node:alpine + +RUN npm install -g redoc-cli + +WORKDIR /data +EXPOSE 8080 + +ENTRYPOINT ["redoc-cli"] +CMD []