Compare commits

...

7 Commits
2.0.2 ... 2.0.9

3 changed files with 9 additions and 6 deletions

View File

@ -12,7 +12,7 @@ RUN sudo apt-get install -y wget
#Instalando jq #Instalando jq
RUN sudo apt-get install -y 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 && echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
RUN ARCH="$(dpkg --print-architecture)" \ RUN ARCH="$(dpkg --print-architecture)" \

View File

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

View File

@ -1 +1 @@
2.0.2 2.0.9