Skip to content

Commit c28400b

Browse files
marc-hblgirdwood
authored andcommitted
scripts/docker-run.sh: fix wrong uid in warning 1001 -> 1000
Fixes commit d09844a ("zephyr/docker-build.sh: match UID with 'adduser' instead of 'chgrp -R'") Also clarify comment and add reference to new sudo-cwd.sh script. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 0a4b1d6 commit c28400b

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

scripts/docker-run.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ if tty --quiet; then
2525
SOF_DOCKER_RUN="$SOF_DOCKER_RUN --tty"
2626
fi
2727

28-
# Not fatal, just a warning to allow other "creative" solutions.
29-
# TODO: fix this with 'adduser' like in zephyr/docker-build.sh
30-
test "$(id -u)" = 1001 ||
31-
>&2 printf "Warning: this script should be run as user ID 1001 to match the container\n"
28+
# The --user option below can cause the command to run as a user who
29+
# does not exist in the container. So far so good but in case something
30+
# ever goes wrong try replacing --user with the newer
31+
# scripts/sudo-cwd.sh script.
32+
test "$(id -u)" = 1000 ||
33+
>&2 printf "Warning: this script should be run as user ID 1000 to match the container's account\n"
3234

3335
set -x
3436
docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \

0 commit comments

Comments
 (0)