From cb8bbbdf4b34cf014c459d1eaea282ce18330733 Mon Sep 17 00:00:00 2001 From: Daniel Rammer Date: Wed, 4 Jan 2023 16:57:16 -0600 Subject: [PATCH] dockerizing buf call Signed-off-by: Daniel Rammer --- generate_protos.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/generate_protos.sh b/generate_protos.sh index b4f905ca7..0f3cfb3c5 100755 --- a/generate_protos.sh +++ b/generate_protos.sh @@ -29,10 +29,7 @@ do done # Buf migration -# TODO: fix stub generation via docker image. The trick of forcing the current user as a user in -# the container (used extensively in this file) does not work. -# docker run --volume "$(pwd):/workspace" --workdir /workspace bufbuild/buf generate -buf generate +docker run -u $(id -u):$(id -g) -e "BUF_CACHE_DIR=/tmp/cache" --volume "$(pwd):/workspace" --workdir /workspace bufbuild/buf generate # Unfortunately the python protoc plugin does not add __init__.py files to the generated code # (as described in https://github.com/protocolbuffers/protobuf/issues/881). One of the