Added option to add system commands at init and exit of the container. These commands will usually be set in Dockerfile of child images.
continuous-integration/drone/push Build is passing

This commit is contained in:
ameerhamzakhan committed 2023-08-29 00:06:56 +08:00
1 parent 63476fa2eb
commit 867c36cec9
1 file changed
+3
+3
View File
@@ -3,6 +3,8 @@ set -x
term_handler() {
eval $USER_COMMAND_EXIT
eval $SYS_COMMAND_EXIT
exit 143; # 128 + 15 -- SIGTERM
}
@@ -14,6 +16,7 @@ sudo mkhomedir_helper `whoami`
touch $LOG_FILE
eval $SYS_COMMAND_INIT &
eval $USER_COMMAND_INIT &
tail -f $LOG_FILE & wait ${!}