forked from gravitational/teleport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-grpcbox
39 lines (33 loc) · 1.15 KB
/
Dockerfile-grpcbox
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
31
32
33
34
35
36
37
38
39
# syntax=docker/dockerfile:1
FROM docker.io/golang:1.23
# Image layers go from less likely to most likely to change.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
npm \
unzip \
&& \
rm -rf /var/lib/apt/lists/*
# protoc-gen-gogofast
# Keep in sync with api/proto/buf.yaml (and buf.lock)
# eg, "v1.3.2"
ARG GOGO_PROTO_TAG
RUN go install "github.com/gogo/protobuf/protoc-gen-gogofast@$GOGO_PROTO_TAG"
# protoc-gen-js and protoc-gen-ts
# eg, "1.12.4"
ARG NODE_GRPC_TOOLS_VERSION
# eg, "5.0.1"
ARG NODE_PROTOC_TS_VERSION
RUN npm install --global "grpc-tools@$NODE_GRPC_TOOLS_VERSION" "grpc_tools_node_protoc_ts@$NODE_PROTOC_TS_VERSION"
# buf
# eg, "v1.26.1"
ARG BUF_VERSION
RUN VERSION="$BUF_VERSION"; \
go install "github.com/bufbuild/buf/cmd/buf@$VERSION"
# Pre-install go-runned binaries.
# This is meant to be the only step that changes depending on the Teleport
# branch.
COPY go.mod go.sum /teleport-module/
RUN cd /teleport-module; \
go install connectrpc.com/connect/cmd/protoc-gen-connect-go && \
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc && \
go install google.golang.org/protobuf/cmd/protoc-gen-go