network_inventory/frontend/Dockerfile

22 lines
471 B
Docker
Raw Normal View History

#Docker file for VueJS using NGINX
# build stage
FROM node:lts-alpine as build-stage
2020-11-27 19:30:27 +01:00
WORKDIR /app
COPY package*.json ./
RUN apk add --update npm
RUN npm install @vue/cli@3.7.0 -g
2020-11-27 19:30:27 +01:00
RUN npm install
COPY . /app
RUN npm run build
2020-11-27 19:30:27 +01:00
# production stage
FROM nginx:stable-alpine as production-stage
2020-11-27 19:30:27 +01:00
COPY --from=build-stage . /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d
2020-11-27 19:30:27 +01:00
2020-11-28 01:22:25 +01:00
ENV PORT = 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]