From f929aaac638c7d01f5ae70fbf84277f38cbaf344 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Tue, 9 Apr 2024 00:21:44 +0000 Subject: [PATCH] Trying to fix user issue. Updating to version 2.0.26 --- entrypoint.sh | 7 +++++++ version.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3a61d02..f5da284 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,12 +18,19 @@ if [ "${HOME_USER-}" ]; then 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 + + # Copy environment variables from vscode user to HOME_USER + env | grep -v 'HOME_USER' | while read -r line; do + sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc" + done + 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. sudo usermod --login "$HOME_USER" vscode sudo groupmod -n "$HOME_USER" vscode + ## Agregar binarios sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd sudo cd /home/${HOME_USER} fi diff --git a/version.txt b/version.txt index 7168dea..46d9844 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.25 \ No newline at end of file +2.0.26 \ No newline at end of file