-
Notifications
You must be signed in to change notification settings - Fork 913
/
Dockerfile.ci
35 lines (34 loc) · 1.25 KB
/
Dockerfile.ci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM docker.io/library/node:18-alpine AS builder
WORKDIR /src
COPY . ./
RUN apk add --no-cache python3 py3-setuptools make g++ git
RUN yarn install --frozen-lockfile --network-timeout 100000 && \
yarn run build && \
# Commit lint CLI packages
npm pack @commitlint/cli && \
npm pack @commitlint/config-validator && \
npm pack @commitlint/config-nx-scopes && \
npm pack @commitlint/ensure && \
npm pack @commitlint/execute-rule && \
npm pack @commitlint/format && \
npm pack @commitlint/is-ignored && \
npm pack @commitlint/lint && \
npm pack @commitlint/load && \
npm pack @commitlint/message && \
npm pack @commitlint/parse && \
npm pack @commitlint/read && \
npm pack @commitlint/resolve-extends && \
npm pack @commitlint/rules && \
npm pack @commitlint/to-lines && \
npm pack @commitlint/top-level && \
npm pack @commitlint/types && \
# Default commitlint config
npm pack @commitlint/config-conventional
FROM docker.io/library/node:18-alpine
RUN apk add --no-cache git
COPY --from=builder /src/*.tgz ./
RUN npm config set fetch-retry-mintimeout 20000 && \
npm config set fetch-retry-maxtimeout 120000 && \
npm install --no-audit -g *.tgz && \
rm -rf *.tgz
ENTRYPOINT ["commitlint"]