docker: Align also caller's group ID with container

This ensures that both UID and GID of the builder user inside the
container is aligned with the caller of kas-docker - or that of "docker
run" when "-e GROUP_ID=..." is specified.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka
2018-11-23 18:16:59 +01:00
committed by Daniel Wagner
parent fe344f93f1
commit 90ae592ff1
2 changed files with 8 additions and 3 deletions

View File

@@ -128,7 +128,7 @@ trace mkdir -p ${KAS_WORK_DIR}
DOCKER_ARGS="-v ${REPO_DIR}:/repo:ro \
-v ${KAS_WORK_DIR}:/work:rw --workdir=/work \
-e USER_ID=$(id -u) --rm"
-e USER_ID=$(id -u) -e GROUP_ID=$(id -g) --rm"
if [ -t 1 ]; then
DOCKER_ARGS="${DOCKER_ARGS} -t -i"