mobitter/Dockerfile

23 lines
401 B
Docker
Raw Normal View History

2023-01-20 16:35:15 +00:00
FROM harbor.k-space.ee/docker.io/library/node AS dev
WORKDIR /app
EXPOSE 8080
COPY package* ./
RUN npm install
COPY . .
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;"]