mirror of
https://github.com/hanzo-ml/kuberay.git
synced 2026-10-30 19:48:47 +00:00
* bump ./proto deps * bump ./apiserver deps * bump ./ray-operator deps * bump ./cli deps * bump ./experimental deps * fixup! bump ./ray-operator deps * Doesn't seem to matter but also bump buildkite * Don't change the distro version just yet * Bump go version in gha jobs * Also bump sigs.k8s.io/controller-tools for build time * more bumps * Update package import paths for proto rename * Fix another deprecated API * s/corev1.ResourceRequirements/corev1.VolumeResourceRequirements/gci rename * Downgrade client-go * update-codegen.sh * Try bumping crd-ref-docs as well * make manifests * make sync * k8s.io/utils/pointer -> k8s.io/utils/ptr * lint: missing formatting directive * make generate * Try to bump version * Bump & standardize builder images * fixup! Bump & standardize builder images * Switch multi-arch Dockerfile to distrolss as well
40 lines
1.6 KiB
Docker
40 lines
1.6 KiB
Docker
# Generate client code (go & json) from API protocol buffers
|
|
FROM golang:1.22.4-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
|