jws-frontend/Dockerfile

22 lines
391 B
Text
Raw Normal View History

2024-04-02 11:02:16 +07:00
FROM node:20-slim as build-stage
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
FROM alpine as production-stage
WORKDIR /app
RUN apk add miniserve --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
COPY --from=build-stage /app/dist/spa .
COPY --from=build-stage /app/entrypoint.sh ./entrypoint.sh
RUN chmod u+x ./entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]