Added option to add system commands at init and exit of the container. These commands will usually be set in Dockerfile of child images.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3,6 +3,8 @@ set -x
|
|||||||
|
|
||||||
term_handler() {
|
term_handler() {
|
||||||
eval $USER_COMMAND_EXIT
|
eval $USER_COMMAND_EXIT
|
||||||
|
eval $SYS_COMMAND_EXIT
|
||||||
|
|
||||||
exit 143; # 128 + 15 -- SIGTERM
|
exit 143; # 128 + 15 -- SIGTERM
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,6 +16,7 @@ sudo mkhomedir_helper `whoami`
|
|||||||
|
|
||||||
touch $LOG_FILE
|
touch $LOG_FILE
|
||||||
|
|
||||||
|
eval $SYS_COMMAND_INIT &
|
||||||
eval $USER_COMMAND_INIT &
|
eval $USER_COMMAND_INIT &
|
||||||
|
|
||||||
tail -f $LOG_FILE & wait ${!}
|
tail -f $LOG_FILE & wait ${!}
|
||||||
|
|||||||
Reference in New Issue
Block a user