diff --git a/Dockerfile b/Dockerfile index a29d0a4..25c9459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,9 @@ -FROM node:20-alpine AS build-stage +FROM node:lts-alpine as builder + WORKDIR /app -COPY package.json . -RUN npm install -COPY . . -RUN npm run build +COPY . ./ +RUN npm install && npm run build + +FROM nginx:alpine -FROM busybox:1.35 -RUN adduser -D static -USER static -WORKDIR /home/static -COPY --from=build-stage /app/dist . -CMD ["busybox", "httpd", "-f", "-v", "-p", "8080"] \ No newline at end of file +COPY --from=builder /app/dist /usr/share/nginx/html \ No newline at end of file