Files
Yuan Hao KuandGitHub d7855fbec8 Upgrade to golang v1.26 from v1.25 (#4597)
* first commit for go 1.26

fix golangci-lint

fix Makefile golang-ci-lint

remove -goroutineleak flag

fix golangci-lint new introduced error

ignore new golangci-lint warnings

disable newexpr which cause false warning

fix cursor suggestion

* fix comment

* Add disable newexpr

* Fix ci proxy fail

* go mod tidy under ray-operator

---------

Signed-off-by: Yuan Hao Ku <[email protected]>
2026-05-01 13:06:17 -07:00

37 lines
937 B
Docker

# Build the backend service
FROM golang:1.26-bookworm AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.sum ./
COPY ray-operator/go.mod ray-operator/go.mod
COPY ray-operator/go.sum ray-operator/go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY proto/ proto/
COPY ray-operator/ ray-operator/
COPY apiserver/ apiserver/
COPY apiserversdk/ apiserversdk/
WORKDIR /workspace/apiserver
# Build
USER root
WORKDIR /workspace/apiserver
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o kuberay-apiserver cmd/main.go
FROM scratch
WORKDIR /workspace
COPY --from=builder /workspace/apiserver/kuberay-apiserver apiserver/
# Support serving swagger files
COPY proto/ proto/
USER 65532:65532
ENTRYPOINT ["/workspace/apiserver/kuberay-apiserver"]