logmower-frontend/Dockerfile
Erki Aas fe21cd9e4a
All checks were successful
continuous-integration/drone Build is passing
Force using base image from harbor.k-space.ee
2022-11-16 13:57:38 +02:00

22 lines
400 B
Docker

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;"]