forked from opea-project/GenAIStudio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 719 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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
# Accept proxy build arguments
ARG http_proxy
ARG https_proxy
ARG no_proxy
# Set proxy environment variables for package managers
ENV http_proxy=${http_proxy}
ENV https_proxy=${https_proxy}
ENV no_proxy=${no_proxy}
COPY ./react /usr/app/react
WORKDIR /usr/app/react
RUN ["npm", "install", "--legacy-peer-deps"]
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