Skip to content

Commit 8d65648

Browse files
authored
feat: fix the CI dockerhub release error (#118)
Because of this project is using golang version 1.19, We should choice a good versions for packages. Changes: - Changed version of google.golang.org/protobuf/cmd/protoc-gen-go from @latest to @v1.28.0 - Changed version of google.golang.org/protobuf/cmd/protoc-gen-go from @latest to @v1.2.0 - Download modules with `go mod download` command instead of downloading packages with latest versions like: "RUN go get google.golang.org/grpc"
1 parent 3874663 commit 8d65648

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ ENV GO111MODULE=on \
2626
GOOS=linux \
2727
GOARCH=amd64
2828

29-
# Get grpc
30-
RUN go get google.golang.org/grpc
29+
# Download dependencies
30+
RUN go mod download
3131

3232
# Install protoc-gen-go
33-
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
34-
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
33+
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.0
34+
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0
3535

3636
# Copy the source and generate the .proto file
3737
ADD . /go/src/github.com/casbin/casbin-server
@@ -40,9 +40,6 @@ RUN protoc --go_out=. --go_opt=paths=source_relative \
4040
--go-grpc_out=. --go-grpc_opt=require_unimplemented_servers=false \
4141
--go-grpc_opt=paths=source_relative proto/casbin.proto
4242

43-
# Download dependencies
44-
RUN go mod download
45-
4643
# Install app
4744
RUN go install .
4845

0 commit comments

Comments
 (0)