Update Dockerfile to use standard node:22-alpine and port 80

This commit is contained in:
Marcos
2026-03-22 21:23:47 -03:00
parent c6c7abe74d
commit 1599197602

View File

@@ -1,15 +1,14 @@
# Estágio de Build
FROM bitnami/node:22 as build-stage
RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
# Build stage
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install --frozen-lockfile || npm install
COPY . .
RUN npm run build
# Estágio de Produção
FROM nginxinc/nginx-unprivileged:alpine as production-stage
RUN apk update && apk upgrade --no-cache
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 8080
# Production stage
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
# Nginx default listen 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]