test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2024-02-25 13:22:12 +08:00
parent 029d1d9f60
commit d16b5252d3
2 changed files with 9 additions and 20 deletions

View File

@ -21,8 +21,6 @@ if [ "${DOCKER_USER-}" ]; then
sudo groupmod -n "$DOCKER_USER" "$USER_HOME"
#sudo printf "user: $DOCKER_USER\ngroup: $DOCKER_USER\n" > /etc/fixuid/config.yml
sudo chown -R "$DOCKER_USER":999 /home/coder
if [ -e "/home/coder/.gitconfig" ]; then
echo "git配置文件已存在"
@ -45,6 +43,7 @@ if [ "${DOCKER_USER-}" ]; then
echo "docker 用户登录完成"
fi
sudo chown -R "$DOCKER_USER":999 /home/coder
# 移除无密码sudo
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
fi
@ -64,5 +63,5 @@ ssh-agent bash
if [ -d "${ENTRYPOINTD}" ]; then
find "${ENTRYPOINTD}" -type f -executable -print -exec {} \;
fi
echo "$@"
su "$(id -un 1000)" -c "exec dumb-init /usr/bin/code-server --bind-addr 0.0.0.0:8080 ."
su "$(id -un 1000)" -c "exec dumb-init /usr/bin/code-server $@"