Signed-off-by: Rita Brugarolas <rita.brugarolas.brufau@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
19 lines
475 B
Docker
19 lines
475 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 react /usr/app/react
|
|
WORKDIR /usr/app/react
|
|
|
|
RUN ["npm", "install"]
|
|
RUN ["npm", "run", "build"]
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
|
|
COPY ./react/env.sh /docker-entrypoint.d/env.sh
|
|
|
|
COPY ./react/nginx.conf /etc/nginx/conf.d/default.conf
|
|
RUN chmod +x /docker-entrypoint.d/env.sh |