更新 entrypoint.sh
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2024-02-24 11:59:56 +00:00
parent 10f2a6dd80
commit f8f69bbc0b

View File

@ -36,7 +36,7 @@ set -eu
# We do this first to ensure sudo works below when renaming the user.
# Otherwise the current container UID may not exist in the passwd database.
eval "$(fixuid -q)"
su "$(id -un 1000)"
if [ "${DOCKER_USER-}" ]; then
USER="$DOCKER_USER"
if [ "$DOCKER_USER" != "$(whoami)" ]; then
@ -59,6 +59,5 @@ fi
if [ -d "${ENTRYPOINTD}" ]; then
find "${ENTRYPOINTD}" -type f -executable -print -exec {} \;
fi
ARGS = "$@"
echo "${DOCKER_USER} ${@} ${ARGS}"
su "${DOCKER_USER}" -c "exec dumb-init /usr/bin/code-server ${ARGS}"
exec dumb-init /usr/bin/code-server "$@"