Bachelorthesis_Code/frontend/Dockerfile.prod

17 lines
352 B
Docker
Raw Normal View History

2021-05-05 01:08:58 +00:00
FROM node:latest as builder
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --silent
RUN npm install react-scripts -g --silent
2021-07-12 20:38:20 +00:00
RUN npm audit fix
2021-06-30 00:14:42 +00:00
COPY . ./
2021-05-05 01:08:58 +00:00
RUN npm run build
FROM nginx:latest
COPY --from=builder /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]