From 74f74bf8f8deaacaa59f6bb1cf20c5d023d150c2 Mon Sep 17 00:00:00 2001 From: mol Date: Sun, 25 Feb 2024 06:12:50 +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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ef9c46c..d0ee7f1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,11 +30,11 @@ if [ "${DOCKER_USER-}" ]; then fi # git使用openssh的shh程序 - su "$(id -un 1000)" -c 'git config --global core.sshCommand "/usr/bin/ssh"' + su "$(id -un 1000)" -c "git config --global core.sshCommand /usr/bin/ssh" if [ -n "$GIT_USER" ] && [ -n "$GIT_EMAIL" ]; then - su "$(id -un 1000)" -c 'git config --global user.name "$GIT_USER"' - su "$(id -un 1000)" -c 'git config --global user.email "$GIT_EMAIL"' + su "$(id -un 1000)" -c "git config --global user.name '$GIT_USER'" + su "$(id -un 1000)" -c "git config --global user.email '$GIT_EMAIL'" echo "git 用户已设置完毕" fi @@ -58,6 +58,5 @@ ssh-agent bash if [ -d "${ENTRYPOINTD}" ]; then find "${ENTRYPOINTD}" -type f -executable -print -exec {} \; fi -RUN_CMD="exec dumb-init /usr/bin/code-server $@" -echo $RUN_CMD -su "$(id -un 1000)" -c $RUN_CMD + +su "$(id -un 1000)" -c "exec dumb-init /usr/bin/code-server '$@'"