Files
GenAIExamples/DocSum/ui/docker/Dockerfile.react
XinyaoWa d73129cbf0 Refactor folder to support different vendors (#743)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-10 23:27:19 +08:00

24 lines
530 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;"]