diff --git a/Dockerfile.frontend b/Dockerfile.frontend index 043db74..decb9eb 100644 --- a/Dockerfile.frontend +++ b/Dockerfile.frontend @@ -7,6 +7,17 @@ # Also used for the lite (unmanaged) deployment. # ========================================== +# Build stage +FROM alpine:3.19 AS builder + +WORKDIR /app +RUN apk add --no-cache bash coreutils + +COPY build.sh ./ +COPY src ./src + +RUN chmod +x build.sh && ./build.sh + # Production stage FROM nginx:alpine @@ -14,7 +25,7 @@ FROM nginx:alpine COPY nginx.frontend.conf /etc/nginx/conf.d/default.conf # Built SPA files -COPY src /app/standalone /usr/share/nginx/html +COPY --from=builder /app/standalone /usr/share/nginx/html EXPOSE 80