diff --git a/ci/docker-entrypoint.sh b/ci/docker-entrypoint.sh index 6e584d37e3d70..b778560db0f35 100755 --- a/ci/docker-entrypoint.sh +++ b/ci/docker-entrypoint.sh @@ -2,6 +2,8 @@ set -e loglevel="${loglevel:-}" +USERID=$(id -u) + # if the first argument look like a parameter (i.e. start with '-'), run Envoy if [ "${1#-}" != "$1" ]; then @@ -15,7 +17,7 @@ if [ "$1" = 'envoy' ]; then fi fi -if [ "$ENVOY_UID" != "0" ]; then +if [ "$ENVOY_UID" != "0" ] && [ "$USERID" = 0 ]; then if [ -n "$ENVOY_UID" ]; then usermod -u "$ENVOY_UID" envoy fi