ARG WINDOWS_VERSION=1903 # Build the manager binary FROM --platform=windows/amd64 golang:1.20 AS builder ## GOLANG env ENV GO111MODULE="on" CGO_ENABLED="0" GOOS="windows" GOARCH="amd64" ARG GOPROXY="https://proxy.golang.org,direct" WORKDIR /webhook-test-proxy ## Build COPY . . RUN go build -a -o webhook-test-proxy cmd/webhook-test-proxy.go ENTRYPOINT ["webhook-test-proxy"] ## Copy binary to a thin image FROM mcr.microsoft.com/windows/nanoserver:${WINDOWS_VERSION} WORKDIR / COPY --from=builder /webhook-test-proxy . COPY THIRD_PARTY_LICENSES.md . ENTRYPOINT ["/webhook-test-proxy"]