also monitor docker daemon process when using dind-rootless

This commit is contained in:
sebthom 2023-06-03 12:40:04 +02:00
parent 70913f84ad
commit c45c9fc54b
1 changed files with 32 additions and 28 deletions

View File

@ -120,7 +120,7 @@ unset $(env | grep "^GITEA_" | cut -d= -f1)
# run the act runner
#################################################
case $DOCKER_MODE in
dind)
dind*)
act_runner daemon --config "$effective_config_file" &
act_runner_pid=$!
@ -131,7 +131,11 @@ case $DOCKER_MODE in
function shutdown_docker() {
log INFO "Stopping docker engine..."
if [[ $DOCKER_MODE == "dind-rootless" ]]; then
kill -SIGTERM $DOCKER_PID
else
sudo service docker stop
fi
while [[ -e /proc/$DOCKER_PID ]]; do
log INFO "Waiting for docker engine to shutdown..."
sleep 2