-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Containerfile to create image from current source
Signed-off-by: Matthias Blümel <[email protected]>
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.* | ||
/node_modules | ||
/appscan-config.xml | ||
/*.md | ||
/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:current-alpine3.17 AS builder | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm ci | ||
|
||
COPY . ./ | ||
RUN cd packages/validator && npm pack && mv ibm-openapi-validator-*.tgz /tmp/ibm-openapi-validator-latest.tgz | ||
|
||
FROM node:current-alpine3.17 | ||
|
||
RUN apk add --no-cache git | ||
|
||
COPY --from=builder /tmp/ibm-openapi-validator-latest.tgz /tmp | ||
# not possible to install from github directly https://github.com/npm/npm/issues/2974 | ||
RUN npm install -g /tmp/ibm-openapi-validator-latest.tgz \ | ||
&& npm cache clean --force | ||
|
||
WORKDIR /code | ||
ENTRYPOINT ["lint-openapi", "--config", "/config.json", "--codeclimate"] |