JanetFrontEnd/Dockerfile

33 lines
484 B
Docker
Raw Normal View History

2023-04-07 00:39:26 +02:00
FROM node:16-alpine as build
2023-03-30 15:15:54 +02:00
WORKDIR /app
2023-04-07 17:45:39 +02:00
COPY package.json .
COPY package-lock.json .
2023-03-30 15:15:54 +02:00
2023-04-18 03:30:50 +02:00
RUN npm install react-router-dom
2023-04-07 00:52:41 +02:00
RUN npm install
2023-08-22 11:18:43 +02:00
RUN rm -fr /root/.cache/*
2023-04-07 17:36:38 +02:00
COPY ./src ./src
COPY ./public ./public
ARG version_info
ENV REACT_APP_VERSION_INFO=${version_info}
2023-04-09 00:49:48 +02:00
RUN npm run build
2023-04-07 17:36:38 +02:00
2023-04-07 00:52:41 +02:00
COPY . .
2023-04-09 00:49:48 +02:00
#CMD ["npm", "start"]
2023-04-09 00:43:06 +02:00
2023-08-22 11:18:43 +02:00
RUN rm -fr /root/.cache/*
2023-04-09 00:49:48 +02:00
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY nginx.default.conf /etc/nginx/conf.d/default.conf
2023-04-07 00:27:23 +02:00
2023-08-22 11:18:43 +02:00