Signed-off-by: Abolfazl Shahbazi <12436063+ashahba@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
25 lines
531 B
Docker
25 lines
531 B
Docker
# Copyright (C) 2024 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Use node 20.11.1 as the base image
|
|
FROM node:20.11.1 as vite-app
|
|
|
|
COPY . /usr/app
|
|
WORKDIR /usr/app/react
|
|
|
|
ARG BACKEND_SERVICE_ENDPOINT
|
|
ENV VITE_DOC_SUM_URL=$BACKEND_SERVICE_ENDPOINT
|
|
|
|
RUN ["npm", "install"]
|
|
RUN ["npm", "run", "build"]
|
|
|
|
|
|
FROM nginx:alpine
|
|
EXPOSE 80
|
|
|
|
|
|
COPY --from=vite-app /usr/app/react/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|