Skip to content

Commit

Permalink
Add google.golang.org protoc
Browse files Browse the repository at this point in the history
  • Loading branch information
hjiawei committed Jun 15, 2024
1 parent d30f7c5 commit e69bc84
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ARG GO_LINT_VERSION=v1.57.2
ARG K8S_VERSION=v1.28.10
ARG K8S_LIBS_VERSION=v0.28.10
ARG MOCKERY_VERSION=2.42.2
ARG PROTOC_VERSION=25.3

ARG CALICO_CONTROLLER_TOOLS_VERSION=calico-0.1

Expand Down Expand Up @@ -159,6 +160,28 @@ RUN set -eux; \
*) echo >&2 "warning: unsupported architecture '${TARGETARCH}'" ;; \
esac

RUN set -eux; \
url=; \
case "${TARGETARCH}" in \
'amd64') \
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"; \
;; \
'arm64') \
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip"; \
;; \
'ppc64le') \
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-ppcle_64.zip"; \
;; \
's390x') \
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-s390_64.zip"; \
;; \
*) echo >&2 "error: unsupported architecture '${TARGETARCH}'"; exit 1 ;; \
esac; \
\
curl -sfL "$url" -o protoc.zip; \
unzip protoc.zip -d /usr/local -x readme.txt; \
rm -f protoc.zip

# Install go programs that we rely on
# Install ginkgo v2 as ginkgo2 and keep ginkgo v1 as ginkgo
RUN go install github.com/onsi/ginkgo/v2/[email protected] && mv /go/bin/ginkgo /go/bin/ginkgo2 && \
Expand All @@ -170,6 +193,8 @@ RUN go install github.com/onsi/ginkgo/v2/[email protected] && mv /go/bin/ginkgo /go
go install github.com/wadey/[email protected] && \
go install golang.org/x/tools/cmd/[email protected] && \
go install golang.org/x/tools/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected] && \
go install google.golang.org/protobuf/cmd/[email protected] && \
go install gotest.tools/[email protected] && \
go install k8s.io/code-generator/cmd/client-gen@${K8S_LIBS_VERSION} && \
go install k8s.io/code-generator/cmd/conversion-gen@${K8S_LIBS_VERSION} && \
Expand Down

0 comments on commit e69bc84

Please sign in to comment.