Signed-off-by: supriya-krishnamurthi <supriya.krishnamurthi@intel.com> Signed-off-by: Yogesh <yogeshpandey@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: lvliang-intel <liang1.lv@intel.com> Co-authored-by: Yogesh <yogeshpandey@intel.com> Co-authored-by: Hoong Tee, Yeoh <hoong.tee.yeoh@intel.com> Co-authored-by: Yogesh Pandey <yogesh.pandey@intel.com>
25 lines
559 B
Docker
25 lines
559 B
Docker
# Copyright (C) 2024 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Stage 1: Build the React application using Node.js
|
|
# Use Node 20.11.1 as the base image for the build step
|
|
FROM node:20.11.1 AS vite-app
|
|
|
|
WORKDIR /usr/app/react
|
|
|
|
COPY react /usr/app/react
|
|
WORKDIR /usr/app/react
|
|
|
|
|
|
RUN ["npm", "install"]
|
|
RUN ["npm", "run", "build"]
|
|
|
|
FROM nginx:alpine
|
|
|
|
EXPOSE 80
|
|
|
|
COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
|
|
COPY --from=vite-app /usr/app/react/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|