FROM node:22-alpine AS builder WORKDIR /repo ARG APP_DIR COPY package.json package-lock.json tsconfig.json tsconfig.base.json ./ COPY frontend ./frontend RUN --mount=type=cache,target=/root/.npm npm ci RUN npm run build --workspace=${APP_DIR} FROM alpine:3.21 AS export ARG APP_DIR COPY --from=builder /repo/${APP_DIR}/dist /app/dist