forked from aquasecurity/trivy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.protoc
20 lines (15 loc) · 771 Bytes
/
Dockerfile.protoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM --platform=linux/amd64 golang:1.22
# Set environment variable for protoc
ENV PROTOC_ZIP=protoc-3.19.4-linux-x86_64.zip
# Install unzip for protoc installation and clean up cache
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
# Download and install protoc
RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/$PROTOC_ZIP \
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
&& rm -f $PROTOC_ZIP
# Install Go tools
RUN go install github.com/twitchtv/twirp/[email protected]
RUN go install google.golang.org/protobuf/cmd/[email protected]
RUN go install github.com/magefile/[email protected]
ENV TRIVY_PROTOC_CONTAINER=true