diff --git a/Dockerfile b/Dockerfile index c924d7fa..32f7eb32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:alpine -WORKDIR /usr/src/app -COPY . /usr/src/app -RUN npm install && npm run release -WORKDIR /src -ENTRYPOINT [ "node", "/usr/src/app/bin/index.js" ] +WORKDIR /usr/src/openapi +COPY . /usr/src/openapi +RUN npm install +RUN npm run release +ENTRYPOINT [ "node", "/usr/src/openapi/bin/index.js" ] CMD "--help" diff --git a/README.md b/README.md index 1981493b..b851329a 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![NPM][npm-image]][npm-url] [![License][license-image]][license-url] [![Coverage][coverage-image]][coverage-url] +[![Coverage][coverage-image]][coverage-url] [![Downloads][downloads-image]][downloads-url] [![Build][build-image]][build-url] @@ -58,17 +59,18 @@ $ openapi --help ## Docker usage -* Help screen +To build the Docker container, execute the following command: - ``` - docker run leeelenbaas/openapi-typescript-codegen --help - ``` +``` +docker build . --tag openapi-typescript-codegen +``` -* Generate client for `sample.yaml` in current folder to the `client` subfolder +After this is done, you can execute the CLI commands: - ``` - docker run -v "$PWD:/src" leeelenbaas/openapi-typescript-codegen -i sample.yaml -o client - ``` +``` +docker run openapi-typescript-codegen --help +docker run openapi-typescript-codegen --input sample.yaml --output client +``` Documentation ===