Files
kuberay/proto/Dockerfile
b543cd35cb [cherry-pick] Changes required make a build after update of component-base (#3004) (#3163)
* Changes required make a build after update of component-base (#3004)

* Update packages required for bump to component-base

* Update version of controller-gen required by packages update

Migrate to kube_codegen.sh

* Sync CRDs post generator update

* Docker and go-toolchain update

* Update tests to align with package changes

A in SetFeatureGateDuringTest, that stopped returning a cleanup func - https://github.com/kubernetes/kubernetes/issues/123677
Required tests update to not use `It()` while it could be `By()` as using `It()` resulted in parallel access to the feature gates.

* Change enforced by golangci-lint - fieldalignment

* Regenerate client code with new generator

* [CI] fix locust versions (#3100)

Signed-off-by: Rueian <[email protected]>

* [ci] remove the test for modin because its certificate is broken (#3135)

Signed-off-by: Rueian <[email protected]>

---------

Signed-off-by: Rueian <[email protected]>
Co-authored-by: Rueian <[email protected]>
2025-03-12 07:22:27 -04:00

40 lines
1.6 KiB
Docker

# Generate client code (go & json) from API protocol buffers
FROM golang:1.23.6-bullseye AS generator
ENV PROTOC_VERSION 3.17.3
ENV GOLANG_PROTOBUF_VERSION v1.5.2
ENV GRPC_GATEWAY_VERSION v2.6.0
ENV GRPC_GATEWAY_OPENAPI_VERSION v2.5.0
ENV GRPC_VERSION v1.38.0
ENV GOLANG_GRPC_VERSION v1.1.0
ENV GOBIN=/go/bin
# Install protoc.
USER root
RUN wget https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -O /usr/bin/jq && chmod +x /usr/bin/jq
RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
RUN unzip -o protoc.zip -d /usr/ bin/protoc
RUN unzip -o protoc.zip -d /usr/ 'include/*'
RUN rm -f protoc.zip
ENV PROTOCCOMPILER /usr/bin/protoc
ENV PROTOCINCLUDE /usr/include/google/protobuf
# Install protoc-gen-go && protoc-gen-go-grpc
RUN go install github.com/golang/protobuf/protoc-gen-go@$GOLANG_PROTOBUF_VERSION
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$GOLANG_GRPC_VERSION
# These go binaries are installed under /go/bin
ENV PATH /go/bin:${PATH}
# Install protoc-gen-rpc-gateway && protoc-gen-openapiv2.
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@$GRPC_GATEWAY_VERSION
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@$GRPC_GATEWAY_OPENAPI_VERSION
# WORKAROUND: https://github.com/docker-library/golang/issues/225#issuecomment-403170792
ENV XDG_CACHE_HOME /tmp/.cache
# Make all files accessible to non-root users.
RUN chmod -R 775 /usr/bin/
RUN chmod -R 775 /usr/include/google
RUN chmod -R 775 /go
USER 65532:65532