Browse Source

using node slim container to reduce container size

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
6caf54d607
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Dockerfile

+ 2 - 2
Dockerfile

@@ -1,5 +1,5 @@
 # => Building container
-FROM node:18 as builder
+FROM node:18-slim as builder
 WORKDIR /app
 COPY . .
 
@@ -15,7 +15,7 @@ ENV PORT 80
 RUN yarn build
 
 # => Copy to Final container
-FROM node:18
+FROM node:18-slim
 WORKDIR /app
 COPY --from=builder /app/server/dist /app/dist
 COPY --from=builder /app/client/build /app/build