File tree Expand file tree Collapse file tree 1 file changed +6
-31
lines changed
Expand file tree Collapse file tree 1 file changed +6
-31
lines changed Original file line number Diff line number Diff line change 1- FROM node:12 as compiler
1+ FROM node:16-alpine
22
33WORKDIR /usr/src/spectral
44
5- COPY package.json tsconfig.rollup.json rollup.config.js yarn.lock tsconfig.build.json tsconfig.json /usr/src/spectral/
6- COPY scripts/ /usr/src/spectral/scripts
7- COPY src/ /usr/src/spectral/src/
8-
9- RUN yarn && yarn build
10-
11- # ##############################################################
12- FROM node:12 as dependencies
13-
14- WORKDIR /usr/src/spectral/
15-
16- COPY package.json /usr/src/spectral/
17-
18- ENV NODE_ENV production
19- RUN yarn --production
20-
21- RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash
22- RUN ./bin/node-prune
23-
24- # ##############################################################
25- FROM node:12-alpine
26-
5+ COPY scripts/install.sh /usr/src/spectral/
6+ RUN ls -l
7+ RUN apk --no-cache add curl
8+ RUN ./install.sh
9+ RUN rm ./install.sh
2710ENV NODE_ENV production
2811
29- COPY package.json /usr/src/spectral/
30-
31- COPY --from=compiler /usr/src/spectral/dist /usr/src/spectral/dist
32- COPY --from=dependencies /usr/src/spectral/node_modules/ /usr/src/spectral/node_modules/
33-
34- RUN ln -s /usr/src/spectral/dist/cli/index.js /usr/bin/spectral \
35- && chmod +x /usr/bin/spectral
36-
3712ENTRYPOINT [ "spectral" ]
You can’t perform that action at this time.
0 commit comments