travel-steps/summer2024-frontend/Dockerfile
Renovate Bot 88a4e7dded
chore(deps): update nginxinc/nginx-unprivileged docker tag to v1.28
Signed-off-by: Renovate Bot <renovate@kektus.xyz>
2025-04-25 22:24:08 +00:00

27 lines
565 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM node:22-alpine3.19 as builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginxinc/nginx-unprivileged:1.28-alpine
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
USER root
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
## From builder stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /app/dist /usr/share/nginx/html
USER $UID