mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Cleanup of Docker config
This commit is contained in:
parent
7066737a03
commit
9e2c37d8d6
10
Dockerfile
10
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"
|
||||
|
||||
18
README.md
18
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
|
||||
===
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user