Compare commits

...

4 Commits
2.0.3 ... 2.0.7

3 changed files with 8 additions and 8 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

@ -13,19 +13,19 @@ fi
# Otherwise the current container UID may not exist in the passwd database.
eval "$(fixuid -q)"
echo "HOME_USER: ${HOME_USER}"
echo "whoami: $(whoami)"
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
sudo adduser --disabled-password --gecos "" ${HOME_USER}
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
su - $HOME_USER
# 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 "$DOCKER_USER" vscode
sudo groupmod -n "$DOCKER_USER" vscode
sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
sudo cd /home/${HOME_USER}
fi
fi

View File

@ -1 +1 @@
2.0.3
2.0.7