From ea33903622e25898d084d931e891a963868e6958 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 24 Oct 2024 11:18:02 +0200 Subject: [PATCH] litrpc+proto: fix ownership in docker container This was discovered while debugging the reproducible build. We used the wrong group ID. And the environment variables aren't super portable so we use the correct command to get the numeric user and group IDs. --- litrpc/gen_protos_docker.sh | 3 +-- proto/gen_protos_docker.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/litrpc/gen_protos_docker.sh b/litrpc/gen_protos_docker.sh index 0f755c2f..9d3c2230 100755 --- a/litrpc/gen_protos_docker.sh +++ b/litrpc/gen_protos_docker.sh @@ -17,7 +17,6 @@ docker build -t lit-protobuf-builder \ echo "Compiling and formatting *.proto files..." docker run \ --rm \ - --user $UID:$UID \ - -e UID=$UID \ + --user $(id -u):$(id -g) \ -v "$DIR/../:/build" \ lit-protobuf-builder diff --git a/proto/gen_protos_docker.sh b/proto/gen_protos_docker.sh index 6f598c9e..a3d4ed49 100755 --- a/proto/gen_protos_docker.sh +++ b/proto/gen_protos_docker.sh @@ -11,7 +11,6 @@ docker build -q -t lit-protobuf-builder . echo "Compiling and formatting *.proto files..." docker run \ --rm \ - --user $UID:$UID \ - -e UID=$UID \ + --user $(id -u):$(id -g) \ -v "$DIR/../:/build" \ lit-protobuf-builder