log-viewer/frontend/Dockerfile

22 lines
364 B
Docker
Raw Permalink Normal View History

2022-10-11 13:24:15 +00:00
FROM node AS dev
2022-02-08 21:03:34 +00:00
2022-02-09 11:56:34 +00:00
WORKDIR /app
2022-10-05 14:43:41 +00:00
EXPOSE 8080
2022-02-09 11:56:34 +00:00
2022-10-05 14:43:41 +00:00
COPY package* ./
RUN npm install
COPY . .
2022-10-11 13:24:15 +00:00
ENTRYPOINT ["npm", "run", "dev"]
# builder
FROM dev AS builder
RUN npm run build
# serve
FROM nginx AS prod
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist .
ENTRYPOINT ["nginx", "-g", "daemon off;"]