# This image is for local browser E2E only. The release path uses # Dockerfile and never enables the e2e Go build tag. 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/app ./cmd/app RUN CGO_ENABLED=0 GOOS=linux go build -tags=e2e -buildvcs=false -trimpath -ldflags="-s -w" -o /out/consent-fixture ./cmd/consent-fixture FROM ${RUNTIME_IMAGE} LABEL org.opencontainers.image.title="Lincodex local E2E backend" \ org.opencontainers.image.description="Local registration E2E image with a fixed internal mail fixture endpoint" WORKDIR / COPY --from=build /out/app /app COPY --from=build /out/consent-fixture /consent-fixture EXPOSE 8080 9090 USER nonroot:nonroot ENTRYPOINT ["/app"]