Explorar o código

Update Dockerfile

Aykut Saraç %!s(int64=2) %!d(string=hai) anos
pai
achega
ed65a9be66
Modificáronse 1 ficheiros con 4 adicións e 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