FROM node:lts-alpine AS frontend-builder ADD . . RUN cd frontend && npm install && npm run build FROM golang:alpine AS builder ADD . /app COPY --from=frontend-builder frontend/dist /app/frontend/dist RUN apk --no-cache add git RUN cd /app && go build -o minify FROM alpine COPY --from=builder /app/minify /usr/bin/minify CMD ["/usr/bin/minify"]