Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.assets/Dockerfile-grpcbox
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ RUN VERSION="$BUF_VERSION"; \
# 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

ARG UID
ARG GID
RUN mkdir -p /.cache /.npm && \
chown -R $UID:$GID /.cache /.npm /go/pkg/mod/
5 changes: 4 additions & 1 deletion build.assets/grpcbox.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ DOCKER ?= docker

# GRPCBOX_RUN has the necessary invocation to run a command inside the grpcbox.
# Use this variable to run it from other Makefiles.
GRPCBOX_RUN := $(DOCKER) run -it --rm -v "$$(pwd)/../:/workdir" -w /workdir $(GRPCBOX)
UID := $$(id -u)
GID := $$(id -g)
GRPCBOX_RUN := $(DOCKER) run -it --rm -u $(UID):$(GID) -v "$$(pwd)/../:/workdir" -w /workdir $(GRPCBOX)

# grpcbox builds a codegen-focused buildbox.
# It's leaner, meaner, faster and not supposed to compile code.
Expand All @@ -30,6 +32,7 @@ grpcbox:
--build-arg GOGO_PROTO_TAG=$(GOGO_PROTO_TAG) \
--build-arg NODE_GRPC_TOOLS_VERSION=$(NODE_GRPC_TOOLS_VERSION) \
--build-arg NODE_PROTOC_TS_VERSION=$(NODE_PROTOC_TS_VERSION) \
--build-arg UID=$(UID) --build-arg GID=$(GID) \
-f Dockerfile-grpcbox \
-t "$(GRPCBOX)" \
../
Loading