Skip to content

Commit e0bede8

Browse files
committed
minor changes
1 parent 0934c59 commit e0bede8

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

images/dev-go/Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# dart's protoc plugin does not publish pre-builds,
77
# so we have to build it ourselves
88
# This builder will produce the statically linked binary
9-
# /build/protoc_plugin/bin/protoc_plugin
9+
# /protoc-gen-dart
1010

1111
# based on debian 12 (bookworm-slim)
1212
FROM dart:3.6.0-sdk AS dart-builder
@@ -20,7 +20,10 @@ RUN curl -fsSL https://github.com/google/protobuf.dart/archive/refs/tags/protoc_
2020
&& cd protoc_plugin \
2121
&& dart pub get \
2222
&& dart compile exe bin/protoc_plugin.dart \
23-
&& rm /build/* -rf
23+
&& mv bin/protoc_plugin.exe /protoc-gen-dart \
24+
&& cd /build \
25+
&& rm /build/* -rf \
26+
&& dart pub cache clean
2427

2528

2629
# based on the debian 12 ("bookworm") go image
@@ -77,7 +80,7 @@ RUN wget https://github.com/authzed/zed/releases/download/v${ZED_VERSION}/zed_${
7780
# install javascript proto plugin and grpc-web codegen
7881
# https://github.com/protocolbuffers/protobuf-javascript/
7982
# TODO: renovate
80-
ENV PROTOC_JS_VERSION=3.21.4
83+
ENV PROTOC_JS_VERSION=3.21.2
8184
RUN wget -qO- https://github.com/protocolbuffers/protobuf-javascript/releases/download/v${PROTOC_JS_VERSION}/protobuf-javascript-${PROTOC_JS_VERSION}-linux-x86_64.tar.gz \
8285
| tar -xz --strip-components=1 -C /usr/local/bin bin/protoc-gen-js
8386

@@ -88,7 +91,7 @@ RUN wget -q https://github.com/grpc/grpc-web/releases/download/${PROTOC_WEB_VERS
8891
&& chmod +x /usr/local/bin/protoc-gen-grpc-web
8992

9093
# install dart protoc plugin
91-
COPY --from=dart-builder /build/protoc_plugin/bin/protoc_plugin.exe /usr/local/bin/protoc-gen-dart
94+
COPY --from=dart-builder /protoc-gen-dart /usr/local/bin/protoc-gen-dart
9295

9396

9497
# clean up apt artifacts,
@@ -165,8 +168,10 @@ RUN go install github.com/favadi/protoc-go-inject-tag@v${GO_INJECT_TAG_VERSION}
165168
# install go proto plugin and grpc codegen
166169
# https://protobuf.dev/getting-started/gotutorial/
167170
# TODO: renovate
168-
RUN go install google.golang.org/protobuf/cmd/[email protected]
169-
RUN go install google.golang.org/grpc/cmd/[email protected]
171+
RUN go install google.golang.org/protobuf/cmd/[email protected] \
172+
&& go clean -modcache
173+
RUN go install google.golang.org/grpc/cmd/[email protected] \
174+
&& go clean -modcache
170175
ENV PATH="$PATH:$(go env GOPATH)/bin"
171176

172177
# install gofumpt, a stricter gofmt

0 commit comments

Comments
 (0)