Cleanup of Docker config

This commit is contained in:
Ferdi Koomen 2023-04-11 09:02:19 +02:00
parent 7066737a03
commit 9e2c37d8d6
2 changed files with 15 additions and 13 deletions

View File

@ -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"

View File

@ -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
===