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