mirror of https://github.com/thesofproject/sof.git
scripts/docker-run.sh: fix wrong uid in warning 1001 -> 1000
Fixes commit d09844ab98
("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>
This commit is contained in:
parent
0a4b1d62d5
commit
c28400baaa
|
@ -25,10 +25,12 @@ if tty --quiet; then
|
|||
SOF_DOCKER_RUN="$SOF_DOCKER_RUN --tty"
|
||||
fi
|
||||
|
||||
# Not fatal, just a warning to allow other "creative" solutions.
|
||||
# TODO: fix this with 'adduser' like in zephyr/docker-build.sh
|
||||
test "$(id -u)" = 1001 ||
|
||||
>&2 printf "Warning: this script should be run as user ID 1001 to match the container\n"
|
||||
# The --user option below can cause the command to run as a user who
|
||||
# does not exist in the container. So far so good but in case something
|
||||
# ever goes wrong try replacing --user with the newer
|
||||
# scripts/sudo-cwd.sh script.
|
||||
test "$(id -u)" = 1000 ||
|
||||
>&2 printf "Warning: this script should be run as user ID 1000 to match the container's account\n"
|
||||
|
||||
set -x
|
||||
docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \
|
||||
|
|
Loading…
Reference in New Issue