-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
30 lines (26 loc) · 978 Bytes
/
Dockerfile
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
# builder image
FROM node:22.14.0 AS builder
LABEL maintainer="[email protected]"
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
# add `/usr/src/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY src /usr/src/app/src
COPY types /usr/src/app/types
COPY public /usr/src/app/public
COPY package.json /usr/src/app/package.json
COPY package-lock.json /usr/src/app/package-lock.json
COPY index.html /usr/src/app/index.html
COPY tsconfig.json /usr/src/app/tsconfig.json
COPY vite.config.ts /usr/src/app/vite.config.ts
COPY config/base_config.json /usr/src/app/public/config.json
RUN npm config set update-notifier false
RUN npm install --silent
RUN npm run build --silent
FROM us.gcr.io/broad-dsp-gcr-public/base/nginx:mainline-alpine
COPY --from=builder /usr/src/app/build /usr/share/nginx/html
RUN rm -rf /etc/nginx/conf.d
COPY conf /etc/nginx
CMD ["nginx", "-g", "daemon off;"]