Browse Source

Minimizing image to less than 100mb

Mr. CaT 1 year ago
parent
commit
81e5028df5
1 changed files with 12 additions and 0 deletions
  1. 12 0
      Dockerfile

+ 12 - 0
Dockerfile

@@ -0,0 +1,12 @@
+FROM node:14-alpine AS build
+
+WORKDIR /app
+ADD package*.json /app
+RUN npm install --legacy-peer-deps
+ADD . /app
+RUN npm run build
+
+FROM nginx:1.25.4-alpine
+
+COPY --from=build /app/default.conf /etc/nginx/conf.d/default.conf
+COPY --from=build /app/build /usr/share/nginx/html