-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add protoc Dockerfile and instructions
Signed-off-by: Matthias Bertschy <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.23-bookworm AS builder | ||
|
||
ENV GO111MODULE=on CGO_ENABLED=0 | ||
WORKDIR /work | ||
|
||
RUN git clone -q --depth 1 https://github.com/kubernetes/kubernetes.git /go/src/k8s.io/kubernetes | ||
RUN go install github.com/gogo/protobuf/protoc-gen-gogo@latest | ||
RUN go install golang.org/x/tools/cmd/goimports@latest | ||
RUN go install k8s.io/code-generator/cmd/go-to-protobuf@latest | ||
RUN apt-get update && apt-get install -y unzip | ||
RUN wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v28.0/protoc-28.0-linux-x86_64.zip && \ | ||
unzip -q /tmp/protoc.zip -d /usr/local && \ | ||
rm /tmp/protoc.zip |