Skip to content

Commit

Permalink
Cleanup of Docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdikoomen committed Apr 11, 2023
1 parent 7066737 commit 9e2c37d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -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
===
Expand Down

0 comments on commit 9e2c37d

Please sign in to comment.