-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa0c3e0
commit 9e9be16
Showing
2 changed files
with
12 additions
and
6 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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
FROM golang:bookworm AS builder | ||
WORKDIR /build-dir | ||
RUN apt-get update && apt-get install -y make git bash protobuf-compiler | ||
RUN apt-get update && apt-get install -y make git bash protobuf-compiler unzip curl | ||
|
||
# Install a specific version of protoc | ||
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip && \ | ||
unzip protoc-28.2-linux-x86_64.zip -d /usr/local/ && \ | ||
rm protoc-28.2-linux-x86_64.zip && \ | ||
chmod +x /usr/local/bin/protoc | ||
|
||
# Set the PATH to include Go binaries | ||
ENV PATH=$PATH:/root/go/bin | ||
|
@@ -15,7 +21,7 @@ RUN go mod download | |
|
||
# Install protoc Go plugins | ||
RUN go install google.golang.org/protobuf/cmd/[email protected] | ||
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 | ||
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 | ||
|
||
ENV GOCACHE=/root/.cache/go-build | ||
|
||
|