mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-01-09 05:06:46 -06:00
Trying to fix issue. updating to version 3.0.11
This commit is contained in:
parent
5dbb07fd80
commit
b7d52df70b
@ -39,14 +39,11 @@ USER="$HOME_USER"
|
|||||||
if ! id -u $HOME_USER > /dev/null 2>&1; then
|
if ! id -u $HOME_USER > /dev/null 2>&1; 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
|
|
||||||
|
|
||||||
# Then execute entrypoint.sh
|
# Check if the .bashrc file exists, if not, create it
|
||||||
if [ "$HOME_USER" != "$(whoami)" ]; then
|
if [ ! -f /home/${HOME_USER}/.bashrc ]; then
|
||||||
exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh"
|
sudo touch /home/${HOME_USER}/.bashrc
|
||||||
|
fi
|
||||||
# Execute the entrypoint.sh script as the user
|
|
||||||
else
|
|
||||||
|
|
||||||
# Change the ownership of the .bashrc file
|
# Change the ownership of the .bashrc file
|
||||||
sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc
|
sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc
|
||||||
@ -66,9 +63,6 @@ else
|
|||||||
echo "export $line" | sudo tee -a /home/${HOME_USER}/.bashrc
|
echo "export $line" | sudo tee -a /home/${HOME_USER}/.bashrc
|
||||||
done
|
done
|
||||||
|
|
||||||
# Source the .bashrc file to apply the changes immediately
|
|
||||||
sudo su -l ${HOME_USER} -c "source ~/.bashrc"
|
|
||||||
|
|
||||||
# Creating .vscode folder if it doesn't exist
|
# Creating .vscode folder if it doesn't exist
|
||||||
if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
|
if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
|
||||||
sudo mkdir -p /home/${HOME_USER}/.vscode
|
sudo mkdir -p /home/${HOME_USER}/.vscode
|
||||||
@ -78,6 +72,11 @@ else
|
|||||||
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode
|
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Then execute entrypoint.sh
|
||||||
|
if [ "$HOME_USER" != "$(whoami)" ]; then
|
||||||
|
exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
# Find .sh files in /usr/bin/custom-scripts and execute them in order
|
# Find .sh files in /usr/bin/custom-scripts and execute them in order
|
||||||
for script in $(find /usr/bin/custom-scripts -name "*.sh" | sort); do
|
for script in $(find /usr/bin/custom-scripts -name "*.sh" | sort); do
|
||||||
chmod +x $script
|
chmod +x $script
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.10
|
3.0.11
|
Loading…
Reference in New Issue
Block a user