forked from stoplightio/spectral-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (21 loc) · 720 Bytes
/
Dockerfile
File metadata and controls
34 lines (21 loc) · 720 Bytes
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
FROM node:14 as builder
COPY package.json yarn.lock ./
RUN yarn
COPY src ./src
COPY tsconfig.json tsconfig.json
RUN yarn
RUN yarn build
###############################################################
FROM node:14 as dependencies
ENV NODE_ENV production
COPY package.json yarn.lock ./
RUN yarn --production
RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash
RUN ./bin/node-prune
###############################################################
FROM node:14-alpine as runtime
ENV NODE_ENV production
COPY package.json /action/package.json
COPY --from=builder dist /action/dist
COPY --from=dependencies node_modules /action/node_modules
ENTRYPOINT ["node", "/action/dist/index.js"]