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

This commit is contained in:
mol
2024-02-24 06:03:31 +00:00
parent 7585e15784
commit d92ad7ae06

View File

@ -26,8 +26,8 @@ if [ -n "$DOCKER_USER" ] && [ -n "$DOCKER_PASSWD" ]; then
echo "docker 用户登录完成" >> /tmp/log/info.log
fi
service ssh start >> /tmp/log/info.log
ssh-agent bash >> /tmp/log/info.log
# service ssh start >> /tmp/log/info.log
# ssh-agent bash >> /tmp/log/info.log
cat /tmp/log/info.log
@ -43,8 +43,8 @@ if [ "${DOCKER_USER-}" ]; then
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
# nor can we bind mount $HOME into a new home as that requires a privileged container.
sudo usermod --login "$DOCKER_USER" root
sudo groupmod -n "$DOCKER_USER" root
sudo usermod --login "$DOCKER_USER" coder
sudo groupmod -n "$DOCKER_USER" coder
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
fi