Browse code

hack/dockerfiles: simplify install of tools

Follow-up to 4210ba07d90e4f484938aef4bec9494723619890, which added the
"tool" directive, but kept the existing package references, which means
that installation would potentially happen multiple times.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2026/06/10 20:10:00
Showing 1 changed files
... ...
@@ -32,15 +32,11 @@ RUN <<EOT
32 32
 EOT
33 33
 
34 34
 FROM base AS tools
35
-# go install: versions are pinned in go.mod
36 35
 RUN --mount=from=src,source=/out,target=.,rw \
37 36
     --mount=type=cache,target=/root/.cache/go-build <<EOT
38 37
   set -ex
39
-  go install -v tool \
40
-    github.com/gogo/protobuf/protoc-gen-gogo \
41
-    github.com/gogo/protobuf/protoc-gen-gogofaster \
42
-    github.com/gogo/protobuf/protoc-gen-gogoslick \
43
-    google.golang.org/protobuf/cmd/protoc-gen-go
38
+  # install all tools defined in go.mod
39
+  go install -v tool
44 40
   go build -v \
45 41
     -o /usr/bin/pluginrpc-gen \
46 42
     ./pkg/plugins/pluginrpc-gen