Skip to content

Commit

Permalink
fix empty.proto not found
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan-sharma11 <[email protected]>
  • Loading branch information
Aryan-sharma11 committed Jan 20, 2025
1 parent a01fbb2 commit 81f3528
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ COPY . .

WORKDIR /usr/src/KubeArmor/KubeArmor

RUN go install github.com/golang/protobuf/protoc-gen-go@latest
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
RUN apk add curl
RUN mkdir -p /usr/local/include/google/protobuf && \
curl -L https://raw.githubusercontent.com/protocolbuffers/protobuf/main/src/google/protobuf/empty.proto \
-o /usr/local/include/google/protobuf/empty.proto
RUN make


WORKDIR /usr/src/KubeArmor/BPF

RUN apk add curl
# install bpftool
RUN arch=$(uname -m) bpftool_version=v7.3.0 && \
if [[ "$arch" == "aarch64" ]]; then \
Expand Down
2 changes: 1 addition & 1 deletion protobuf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ go.sum: go.mod

%.pb.go: %.proto
go mod tidy
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative,require_unimplemented_servers=false $<
protoc -I/usr/local/include -I. --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative,require_unimplemented_servers=false $<
sed -i -e 's/\bPPID,omitempty\b/PPID,/' -e 's/\bUID,omitempty\b/UID,/' kubearmor.pb.go

.PHONY: clean
Expand Down

0 comments on commit 81f3528

Please sign in to comment.