ifms-pti/web/Dockerfile

18 lines
391 B
Docker
Raw Normal View History

2020-11-06 13:31:28 +00:00
# build stage
2022-01-20 13:25:24 +00:00
FROM node:16.13.2 as build-stage
2020-11-06 13:31:28 +00:00
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
RUN rm -rf /etc/nginx/conf.d
RUN mkdir -p /etc/nginx/conf.d
COPY ./default.conf /etc/nginx/conf.d/
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]