23 lines
377 B
Docker
23 lines
377 B
Docker
|
FROM node:16-alpine as builder
|
||
|
|
||
|
ENV CHOKIDAR_USEPOLLING 1
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY package.json .
|
||
|
COPY package-lock.json .
|
||
|
|
||
|
RUN npm i
|
||
|
|
||
|
RUN mkdir node_modules/.cache && chmod -R 777 node_modules/.cache
|
||
|
|
||
|
COPY . .
|
||
|
|
||
|
RUN npm run build
|
||
|
|
||
|
FROM nginx:1.23-alpine
|
||
|
|
||
|
COPY --from=builder /app/build /usr/share/nginx/html
|
||
|
|
||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||
|
COPY ./nginx.conf /etc/nginx/conf.d
|