Skip to content

Commit 0c08691

Browse files
committed
Containerfile to create image from current source
Signed-off-by: Matthias Blümel <[email protected]>
1 parent 6d1146e commit 0c08691

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.*
2+
/node_modules
3+
/appscan-config.xml
4+
/*.md
5+
/LICENSE

Containerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:current-alpine3.17 AS builder
2+
3+
COPY package.json package-lock.json ./
4+
RUN npm ci
5+
6+
COPY . ./
7+
RUN cd packages/validator && npm pack && mv ibm-openapi-validator-*.tgz /tmp/ibm-openapi-validator-latest.tgz
8+
9+
FROM node:current-alpine3.17
10+
11+
RUN apk add --no-cache git
12+
13+
COPY --from=builder /tmp/ibm-openapi-validator-latest.tgz /tmp
14+
# not possible to install from github directly https://github.com/npm/npm/issues/2974
15+
RUN npm install -g /tmp/ibm-openapi-validator-latest.tgz \
16+
&& npm cache clean --force
17+
18+
WORKDIR /code
19+
ENTRYPOINT ["lint-openapi", "--config", "/config.json", "--codeclimate"]

0 commit comments

Comments
 (0)