From 50708112ac0934d73bb5a0dfe7713a19a04b93ca Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Tue, 5 Mar 2024 20:02:48 +0000 Subject: [PATCH] Trying to fix again the issue. Updating to version 2.0.10 --- entrypoint.sh | 8 +++++--- version.txt | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 7261d10..13abe43 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -16,8 +16,10 @@ eval "$(fixuid -q)" if [ "${HOME_USER-}" ]; then USER="$HOME_USER" if [ "$HOME_USER" != "$(whoami)" ]; then - sudo adduser --disabled-password --gecos "" ${HOME_USER} - sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null + if ! id -u $HOME_USER > /dev/null 2>&1; then + sudo adduser --disabled-password --gecos "" ${HOME_USER} + sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null + fi sudo -u $HOME_USER -i # 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. @@ -25,7 +27,7 @@ if [ "${HOME_USER-}" ]; then # sudo groupmod -n "$HOME_USER" vscode # sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd - sudo cd /home/${HOME_USER} + # sudo cd /home/${HOME_USER} fi fi diff --git a/version.txt b/version.txt index ed35d09..fee3c92 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.9 \ No newline at end of file +2.0.10 \ No newline at end of file