From 6519cc3ef9daedbc8e97806a4b50fc1ba688818a Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Fri, 12 Apr 2024 08:42:37 +0000 Subject: [PATCH] Trying to fix issue of running entrypont.sh as root. Updating to version 2.0.56 --- entrypoint.sh | 3 +-- version.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ad66fa7..0ea287e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,7 +5,6 @@ set -eu if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exec sudo /usr/bin/entrypoint.sh - exit 0 fi if [[ -z "${HOME_USER-}" ]]; then @@ -18,7 +17,7 @@ eval "$(fixuid -q)" if [ "${HOME_USER-}" ]; then USER="$HOME_USER" - if [ "$HOME_USER" != "$(whoami)" ]; then + if [[ "${HOME_USER-}" == "vscode" ]]; then 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 diff --git a/version.txt b/version.txt index 33b655a..2c54684 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.55 \ No newline at end of file +2.0.56 \ No newline at end of file