From 41d4f6f73f31da40a6fe99cb8f4d18f3124f8696 Mon Sep 17 00:00:00 2001 From: Ameer Hamza Date: Sun, 27 Aug 2023 18:46:11 +0800 Subject: [PATCH] Added the command to create home directory for the current user of the container. Also added few helpful comments. --- scripts/entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 6f9898c..9e1df02 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -6,8 +6,12 @@ term_handler() { exit 143; # 128 + 15 -- SIGTERM } +# setup handler when the container is exited trap 'kill ${!}; term_handler' SIGTERM +# setup home directory for the current user. It is useful for attaching vscode with container. +sudo mkhomedir_helper `whoami` + touch $LOG_FILE eval $USER_COMMAND_INIT &