From b988aa1099b8d37932f725688acc81973a15207c Mon Sep 17 00:00:00 2001 From: ludelanier Date: Tue, 14 May 2024 14:56:29 +0200 Subject: [PATCH] fix images --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 25c9459..de299a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ -FROM node:lts-alpine as builder - +# build stage +FROM node:lts-hydrogen AS build-stage WORKDIR /app -COPY . ./ -RUN npm install && npm run build - -FROM nginx:alpine +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build -COPY --from=builder /app/dist /usr/share/nginx/html \ No newline at end of file +FROM nginx:stable-alpine AS production-stage +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build-stage /app/dist /usr/share/nginx/html +CMD ["nginx", "-g", "daemon off;"]