# The fixture is built separately from the application and only by the local # E2E Compose overlay. ARG GO_IMAGE=golang:1.26.8-alpine ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot FROM ${GO_IMAGE} AS build ENV GOTOOLCHAIN=local WORKDIR /src/backend COPY go.mod go.sum ./ RUN go mod download COPY . ./ RUN CGO_ENABLED=0 GOOS=linux go build -tags=e2e -buildvcs=false -trimpath -ldflags="-s -w" -o /out/mail-fixture ./cmd/mail-fixture FROM ${RUNTIME_IMAGE} LABEL org.opencontainers.image.title="Lincodex local E2E mail fixture" \ org.opencontainers.image.description="Bounded in-memory Resend-compatible receiver for local browser tests" WORKDIR / COPY --from=build /out/mail-fixture /mail-fixture EXPOSE 8025 USER nonroot:nonroot ENTRYPOINT ["/mail-fixture"]