From b3609b3d0b8a6e257c1eabf2efcdca078814c3be Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Fri, 29 Mar 2024 22:35:02 +0000 Subject: [PATCH] Trying to fix adding environment variables to app. --- entrypoint.sh | 8 ++++---- version.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 2f1ff8d..f914b09 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,6 +20,10 @@ if [ "${HOME_USER-}" ]; 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 + # 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. @@ -29,10 +33,6 @@ if [ "${HOME_USER-}" ]; then # sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd # sudo cd /home/${HOME_USER} sudo chown -R ${HOME_USER}:${HOME_USER} /home/${HOME_USER} - # 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 fi fi diff --git a/version.txt b/version.txt index 476ede4..5ad8f21 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.13 \ No newline at end of file +2.0.14 \ No newline at end of file