From 0e4c2e910bd02d5901f454c9531e9c615411b96b Mon Sep 17 00:00:00 2001 From: Caleb Gilmour Date: Thu, 14 Feb 2019 00:21:02 +0000 Subject: [PATCH] Generate files with correct owner. Signed-off-by: Caleb Gilmour --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5d804e31ac..4c9536a5f7 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,11 @@ pwd := $(shell pwd) mount_dir := /src repo_dir := istio.io/api repo_mount := $(mount_dir)/istio.io/api -docker_gen := docker run --rm -v $(pwd):$(repo_mount) -w $(mount_dir) $(gen_img) -I$(repo_dir) +uid := $(shell id -u) +docker_gen := docker run --rm --user $(uid) -v /etc/passwd:/etc/passwd:ro -v $(pwd):$(repo_mount) -w $(mount_dir) $(gen_img) -I$(repo_dir) out_path = . -docker_lock = docker run --rm -v $(pwd):$(repo_mount) -w $(repo_mount) $(lock_img) -docker_tool = docker run --rm -v $(pwd):$(repo_mount) -w $(repo_mount) $(all_img) prototool +docker_lock = docker run --rm --user $(uid) -v /etc/passwd:/etc/passwd:ro -v $(pwd):$(repo_mount) -w $(repo_mount) $(lock_img) +docker_tool = docker run --rm --user $(uid) -v /etc/passwd:/etc/passwd:ro -v $(pwd):$(repo_mount) -w $(repo_mount) $(all_img) prototool endif ########################