Trying to fix. Updating to version 2.0.5

This commit is contained in:
Alejandro Lembke Barrientos 2024-02-15 06:23:40 +00:00
parent d8a291c82d
commit 9bac2433a6
3 changed files with 8 additions and 8 deletions

View File

@ -44,7 +44,7 @@ RUN sudo sysctl -w fs.inotify.max_user_watches=524288
ADD ./entrypoint.sh /usr/bin/entrypoint.sh ADD ./entrypoint.sh /usr/bin/entrypoint.sh
RUN sudo chmod +x /usr/bin/entrypoint.sh RUN sudo chmod +x /usr/bin/entrypoint.sh
#USER 1000 USER 1000
ENV USER=vscode ENV USER=vscode
WORKDIR /home/vscode WORKDIR /home/vscode

View File

@ -13,14 +13,14 @@ fi
# Otherwise the current container UID may not exist in the passwd database. # Otherwise the current container UID may not exist in the passwd database.
eval "$(fixuid -q)" eval "$(fixuid -q)"
if [ "${HOME_USER-}" ]; then if [ "${DOCKER_USER-}" ]; then
USER="$HOME_USER" USER="$DOCKER_USER"
if [ "$HOME_USER" != "$(whoami)" ]; then if [ "$DOCKER_USER" != "$(whoami)" ]; then
echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# 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 "$DOCKER_USER" vscode
sudo groupmod -n "$HOME_USER" vscode sudo groupmod -n "$DOCKER_USER" vscode
sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
fi fi

View File

@ -1 +1 @@
2.0.4 2.0.5