mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-06-18 20:08:13 -06:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b0b9497107
|
|||
1631237881
|
@ -16,7 +16,7 @@ if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then
|
||||
fi
|
||||
|
||||
# List all environment variables
|
||||
sudo env |
|
||||
printenv |
|
||||
|
||||
# Filter variables that start with GLOBAL_ENV_
|
||||
grep -E '^GLOBAL_ENV_' |
|
||||
@ -40,28 +40,20 @@ if ! id -u $HOME_USER > /dev/null 2>&1; then
|
||||
sudo adduser --disabled-password --gecos "" --uid 1000 ${HOME_USER}
|
||||
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||
|
||||
# Check if the .bashrc file exists, if not, create it
|
||||
#if [ ! -f /home/${HOME_USER}/.bashrc ]; then
|
||||
#sudo touch /home/${HOME_USER}/.bashrc
|
||||
#fi
|
||||
|
||||
# Change the ownership of the .bashrc file
|
||||
#sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc
|
||||
|
||||
# List all environment variables
|
||||
#sudo env |
|
||||
printenv |
|
||||
|
||||
# Filter variables that start with USER_ENV_
|
||||
#grep -E '^USER_ENV_' |
|
||||
grep -E '^USER_ENV_' |
|
||||
|
||||
# Remove the USER_ENV_ prefix
|
||||
#sed 's/^USER_ENV_//' |
|
||||
sed 's/^USER_ENV_//' |
|
||||
|
||||
# Append the result to /home/${HOME_USER}/.bashrc
|
||||
#while IFS= read -r line
|
||||
#do
|
||||
#echo "export $line" | sudo -u ${HOME_USER} tee -a /home/${HOME_USER}/.bashrc
|
||||
#done
|
||||
# Append the result to /usr/bin/.bashrc
|
||||
while IFS= read -r line
|
||||
do
|
||||
echo "export $line" | sudo -u ${HOME_USER} tee -a /usr/bin/.bashrc
|
||||
done
|
||||
|
||||
# Creating .vscode folder if it doesn't exist
|
||||
if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
|
||||
@ -76,7 +68,7 @@ fi
|
||||
if [ "$HOME_USER" != "$(whoami)" ]; then
|
||||
exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh"
|
||||
else
|
||||
sudo chown -R 1000 /home/${HOME_USER}
|
||||
sudo chown -R ${HOME_USER} /home/${HOME_USER}
|
||||
fi
|
||||
|
||||
# Find .sh files in /usr/bin/custom-scripts and execute them in order
|
||||
|
@ -1 +1 @@
|
||||
3.0.20
|
||||
3.0.22
|
Reference in New Issue
Block a user