From f8f69bbc0baea0650f9704d4b6e0a57f8e6af810 Mon Sep 17 00:00:00 2001 From: mol Date: Sat, 24 Feb 2024 11:59:56 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20entrypoint.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entrypoint.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index aaa53ae..e9eaee7 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 "$@"