Explorar el Código

Update Dockerfile

Aykut Saraç hace 2 años
padre
commit
ed65a9be66
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  1. 4 5
      Dockerfile

+ 4 - 5
Dockerfile

@@ -1,11 +1,10 @@
 # Builder
-FROM node:14-buster as builder
+FROM node:14-alpine as builder
 WORKDIR /src
-COPY . /src
-RUN yarn install --legacy-peer-deps
-RUN yarn run build
+COPY . /src/
+RUN npm ci && npm run build
 
 # App
 FROM nginxinc/nginx-unprivileged
-COPY --from=builder /src/out /app
+COPY --chown=nginx:nginx --from=builder /src/out /app
 COPY default.conf /etc/nginx/conf.d/default.conf