5
0
Fork 0
mirror of https://github.com/wagoid/commitlint-github-action.git synced 2025-11-07 08:06:54 +00:00
commitlint-github-action/Dockerfile
Diogo Kiss e4c3e786a4 build: upgrade base Docker image to prevent security vulnerability
According to Snyk.io, the currently used base Docker image has 19 security
vulnerabilities (13 high).
https://snyk.io/test/docker/node%3A16.5.0-alpine3.14

On the other hand, the image `node:16.14.2-alpine3.14` has no known security
vulnerabilies.

https://snyk.io/test/docker/node%3A16.14.2-alpine3.14

This commit upgrades the image to fix the above mentioned issues.
2022-05-09 08:19:41 +02:00

23 lines
344 B
Docker

FROM node:16.14.2-alpine3.14 as build
COPY package*.json /
RUN npm ci --ignore-scripts
COPY . .
RUN npm run build
FROM node:16.5.0-alpine3.14
RUN apk --no-cache add git
COPY --from=build dist/run.js /run.js
COPY package*.json /
RUN npm ci --production --ignore-scripts
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]