ARG GO_VERSION=1.25.4 ARG PLAYWRIGHT_VERSION=v1.52.0 ################################### # Stage 1: Build React UI ################################### FROM node:25-slim AS react-ui-builder WORKDIR /app COPY core/http/react-ui/package*.json ./ RUN npm install COPY core/http/react-ui/ ./ RUN npm run build ################################### # Stage 2: Build Go test server + mock backend ################################### FROM ubuntu:24.04 AS go-builder ARG GO_VERSION ARG TARGETARCH ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential ca-certificates curl git unzip libopus-dev pkg-config && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Install Go RUN curl -L -s https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz | tar -C /usr/local -xz ENV PATH=$PATH:/root/go/bin:/usr/local/go/bin # Install protoc + Go gRPC tools RUN < /dev/null 2>&1 && break; \ sleep 1; \ done && \ npx playwright test; \ TEST_EXIT=$?; \ kill %1 2>/dev/null; \ exit $TEST_EXIT \ "]