From 08cf40624dd06011f893b2d219ac2da046bf2dc7 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Fri, 12 Apr 2024 04:06:17 +0000 Subject: [PATCH] Trying to fix issue of deleting vscode user. Updating to version 2.0.52 --- Dockerfile | 4 ++++ entrypoint.sh | 2 +- version.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f56115b..6e28072 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,4 +47,8 @@ RUN sudo sysctl -w fs.inotify.max_user_watches=524288 ADD ./entrypoint.sh /usr/bin/entrypoint.sh RUN sudo chmod +x /usr/bin/entrypoint.sh +USER 1000 +ENV USER=vscode +WORKDIR /home/vscode + ENTRYPOINT ["/usr/bin/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 2e481e0..bc70f5e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -59,7 +59,7 @@ if [ "${HOME_USER-}" ]; then # Delete the vscode user if id "vscode" &>/dev/null; then sudo chown -R vscode:vscode /home/vscode - sudo userdel -r vscode + sudo -u ${HOME_USER} bash -c 'userdel -r vscode' fi else # Switch to the user specified by $HOME_USER and start an interactive shell session. diff --git a/version.txt b/version.txt index 341d64a..aed9c3b 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.51 \ No newline at end of file +2.0.52 \ No newline at end of file