We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82c911f commit 96619edCopy full SHA for 96619ed
src/rootfs/entrypoint.sh
@@ -89,10 +89,13 @@ fi
89
90
# Run the command as the unprivileged user if PUID, PGID are set, or if RUN_AS_USER is different from default
91
if [ ! -z "${PUID}" ] || [ ! -z "${PGID}" ] || [ "$run_as_user" != "$default_unprivileged_user" ]; then
92
+ if [ "$SSH_AUTH_SOCK" ]; then
93
+ debug_print "Ensure the SSH_AUTH_SOCK has the correct permissions..."
94
+ chown "${PUID}:${PGID}" "$SSH_AUTH_SOCK"
95
+ fi
96
debug_print "Running command as \"$run_as_user\"..."
97
switch_user "$@"
98
else
99
debug_print "Running command as root..."
100
exec "$@"
-fi
-
101
+fi
0 commit comments