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
5 changes: 5 additions & 0 deletions build.assets/Dockerfile-grpcbox
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ RUN \
go -C /teleport-module run -exec true google.golang.org/grpc/cmd/protoc-gen-go-grpc && \
go -C /teleport-module run -exec true google.golang.org/protobuf/cmd/protoc-gen-go && \
rm -rf /teleport-module

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,14 +19,17 @@ 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.
.PHONY: grpcbox
grpcbox:
$(DOCKER) build \
--build-arg BUF_VERSION=$(BUF_VERSION) \
--build-arg UID=$(UID) --build-arg GID=$(GID) \
-f Dockerfile-grpcbox \
-t "$(GRPCBOX)" \
../
Loading