mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-01-09 05:06:46 -06:00
Trying to fix adding environment variables to app.
This commit is contained in:
parent
dd283a2c5f
commit
b3609b3d0b
@ -20,6 +20,10 @@ if [ "${HOME_USER-}" ]; then
|
|||||||
sudo adduser --disabled-password --gecos "" ${HOME_USER}
|
sudo adduser --disabled-password --gecos "" ${HOME_USER}
|
||||||
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||||
fi
|
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
|
sudo -u $HOME_USER -i
|
||||||
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
|
# 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.
|
# 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 sed -i "/vscode/d" /etc/sudoers.d/nopasswd
|
||||||
# sudo cd /home/${HOME_USER}
|
# sudo cd /home/${HOME_USER}
|
||||||
sudo chown -R ${HOME_USER}:${HOME_USER} /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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2.0.13
|
2.0.14
|
Loading…
Reference in New Issue
Block a user