Compare commits

...

8 Commits

3 changed files with 11 additions and 6 deletions

View File

@ -12,7 +12,7 @@ RUN sudo apt-get install -y wget
#Instalando jq
RUN sudo apt-get install -y jq
RUN adduser --uid 1001 --gecos '' --disabled-password vscode \
RUN adduser --gecos '' --disabled-password vscode \
&& echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(dpkg --print-architecture)" \

View File

@ -16,13 +16,18 @@ eval "$(fixuid -q)"
if [ "${HOME_USER-}" ]; then
USER="$HOME_USER"
if [ "$HOME_USER" != "$(whoami)" ]; then
echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
if ! id -u $HOME_USER > /dev/null 2>&1; 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
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
# sudo usermod --login "$HOME_USER" vscode
# sudo groupmod -n "$HOME_USER" vscode
sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
# sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
# sudo cd /home/${HOME_USER}
fi
fi

View File

@ -1 +1 @@
2.0.2
2.0.10