We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28c4784 commit 564ca74Copy full SHA for 564ca74
1 file changed
Dockerfile
@@ -1,10 +1,23 @@
1
-FROM node:current
2
-
3
-WORKDIR /app
4
5
-COPY . .
6
7
-RUN npm ci
8
-RUN npm run compile
9
10
-ENTRYPOINT [ "node", "./out/cli/index.js" ]
+FROM node:14-alpine AS builder
+
+WORKDIR /tmp
+# Install node modules first to leverage Docker cache.
+COPY package*.json ./
+RUN npm ci
+COPY tsconfig.json .
+COPY cli/ cli/
11
+COPY src/ src/
12
+RUN npm run compile
13
14
15
+FROM node:14-alpine
16
17
+WORKDIR /app
18
19
+COPY --from=builder /tmp/out .
20
21
+USER node
22
23
+ENTRYPOINT [ "node", "./cli/index.js" ]
0 commit comments