diff --git a/cmd/training-operator.v2alpha1/Dockerfile b/cmd/training-operator.v2alpha1/Dockerfile index 7a941fb8cf..1525d77fa5 100644 --- a/cmd/training-operator.v2alpha1/Dockerfile +++ b/cmd/training-operator.v2alpha1/Dockerfile @@ -3,7 +3,7 @@ FROM golang:1.22 as builder WORKDIR /workspace # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager cmd/training-operator.v2alpha1/main.go +RUN --mount=type=bind,target=. CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager cmd/training-operator.v2alpha1/main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details