generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
36 lines (25 loc) · 958 Bytes
/
Dockerfile
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
36
# ------------------------------------------------------------------------------
# Generate build
# ------------------------------------------------------------------------------
FROM node:16-alpine as generator
LABEL stage=generator
WORKDIR /jci
# Install app dependencies
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn ./.yarn
RUN yarn install --immutable
# Bundle app source
COPY . .
# Package only Docker version
RUN yarn package:docker
# Install production dependencies
RUN yarn workspaces focus --production
# ------------------------------------------------------------------------------
# Second image (release image)
# ------------------------------------------------------------------------------
FROM node:16-alpine
WORKDIR /usr/src/jira-ci-cd-integration
# Now we copy the compiled ncc build folder
COPY --from=generator /jci/dist/docker dist
COPY --from=generator /jci/node_modules ./node_modules
CMD ["node", "dist/index.js"]