Bachelorthesis_Code/frontend/Dockerfile.prod

16 lines
365 B
Text
Raw Permalink Normal View History

2021-07-12 22:38:46 +00:00
FROM node:latest as build
2021-05-05 01:08:58 +00:00
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
2021-07-12 21:09:49 +00:00
RUN npm ci --silent
2021-06-30 00:14:42 +00:00
COPY . ./
2021-05-05 01:08:58 +00:00
RUN npm run build
2021-07-12 22:38:46 +00:00
FROM nginx:latest
COPY --from=build /app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]