-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile.protoc
More file actions
30 lines (23 loc) · 1.12 KB
/
Dockerfile.protoc
File metadata and controls
30 lines (23 loc) · 1.12 KB
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
30
FROM namely/protoc-all:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y -o Dpkg::Options::="--force-confold" install \
unzip \
ruby
RUN gem install grpc-tools
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh \
&& bash nodesource_setup.sh \
&& apt-get -y -o Dpkg::Options::="--force-confold" install nodejs \
&& npm i -g npm \
&& npm i -g ts-protoc-gen --force \
&& npm i -g protoc-gen-js
RUN PROTOC_ZIP=protoc-28.0-linux-x86_64.zip \
&& curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v28.0/$PROTOC_ZIP \
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
&& rm -f $PROTOC_ZIP
# Install modern protoc-gen-grpc-web plugin (compatible with grpc-web 1.5.0+)
RUN GRPC_WEB_VERSION=1.5.0 \
&& curl -OL https://github.com/grpc/grpc-web/releases/download/${GRPC_WEB_VERSION}/protoc-gen-grpc-web-${GRPC_WEB_VERSION}-linux-x86_64 \
&& mv protoc-gen-grpc-web-${GRPC_WEB_VERSION}-linux-x86_64 /usr/local/bin/protoc-gen-grpc-web \
&& chmod +x /usr/local/bin/protoc-gen-grpc-web
ENTRYPOINT []