From fe0c5d00a3f2a4bee7f8210374527eb8dcd7dbf9 Mon Sep 17 00:00:00 2001 From: David Oram Date: Thu, 23 Aug 2018 06:40:48 +1200 Subject: [PATCH] Revert "Dockerfile to package the 'redoc-cli' tool as a docker image" This reverts commit fec72ac0ea674b9d0dfc13bf2d9060241f617078. --- cli/Dockerfile | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/cli/Dockerfile b/cli/Dockerfile index df34b500..9de988b4 100644 --- a/cli/Dockerfile +++ b/cli/Dockerfile @@ -1,30 +1,25 @@ -# Package the 'redoc-cli' as a docker image. -# # To build: -# $ cd -# $ docker build -t redoc-cli -f cli/Dockerfile . +# - Must be in the project root directory +# - docker build -f cli/Dockerfile . # -# To run: -# To display the command line options: -# $ docker run --rm -it redoc-cli redoc-cli --help -# .. will display the comand line help -# -# To the `swagger.yml` file in the current directory, and output 'redoc-static.html' -# $ docker run --rm -it -v $PWD:/data redoc-cli redoc-cli bundle swagger.yml +# To run +# - docker run --rm -i -t --help + FROM node:alpine -# Needs python, alpine-sdk to build node packages RUN apk update && apk add --no-cache git python alpine-sdk nodejs +# generate bundle WORKDIR /build COPY . /build +#RUN cd cli && npm run compile:cli +RUN yarn install --frozen-lockfile --ignore-optional --ignore-scripts +RUN npm run bundle && npm run compile:cli -RUN yarn install --frozen-lockfile --ignore-optional --ignore-scripts && \ - npm run bundle && npm run compile:cli && \ - npm install typescript && \ - npm install iltorb && \ - npm install -g redoc-cli +RUN npm install typescript +RUN npm install iltorb +RUN npm install -g redoc-cli -WORKDIR /data +ENTRYPOINT ["redoc-cli"]