-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.protoc
29 lines (23 loc) · 1012 Bytes
/
Dockerfile.protoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM debian:bookworm
ENV PB_REL="https://github.com/protocolbuffers/protobuf/releases"
ENV PB_VER="3.4.0"
ENV GO_VER="1.18.1"
RUN apt update && \
apt install -y curl unzip git
RUN curl -LO $PB_REL/download/v$PB_VER/protoc-$PB_VER-linux-x86_64.zip && \
unzip protoc-$PB_VER-linux-x86_64.zip -d /usr/local/protoc
ENV PATH="$PATH:/usr/local/protoc/bin"
RUN curl -LO https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz
ENV PATH="$PATH:/usr/local/go/bin"
ENV GOPATH="/usr/local/go/work"
ENV PATH="$PATH:/usr/local/go/work/bin"
RUN go install google.golang.org/protobuf/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected]
RUN git clone https://github.com/flutter/flutter.git -b stable /usr/local/flutter
ENV PATH="$PATH:/usr/local/flutter/bin"
RUN dart pub global activate protoc_plugin
ENV PATH="$PATH:/root/.pub-cache/bin"
COPY protoc.sh /protoc.sh
RUN chmod +x /protoc.sh
ENTRYPOINT ["/protoc.sh"]