Add timing out docker executable

This commit is contained in:
retropikzel 2026-02-20 08:42:11 +02:00
parent bdf761ad95
commit 878a69bcd0
2 changed files with 8 additions and 0 deletions

4
Jenkinsfile vendored
View File

@ -20,6 +20,7 @@ pipeline {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'sh kill_days_containers.sh' sh 'sh kill_days_containers.sh'
sh 'docker system prune -a -f' sh 'docker system prune -a -f'
sh 'install timeout_docker.sh /usr/local/bin/docker'
} }
} }
} }
@ -31,6 +32,7 @@ pipeline {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'sh kill_days_containers.sh' sh 'sh kill_days_containers.sh'
sh 'docker system prune -a -f' sh 'docker system prune -a -f'
sh 'install timeout_docker.sh /usr/local/bin/docker'
} }
} }
} }
@ -42,6 +44,7 @@ pipeline {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'sh kill_days_containers.sh' sh 'sh kill_days_containers.sh'
sh 'docker system prune -a -f' sh 'docker system prune -a -f'
sh 'install timeout_docker.sh /usr/local/bin/docker'
} }
} }
} }
@ -53,6 +56,7 @@ pipeline {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'sh kill_days_containers.sh' sh 'sh kill_days_containers.sh'
sh 'docker system prune -a -f' sh 'docker system prune -a -f'
sh 'install timeout_docker.sh /usr/local/bin/docker'
} }
} }
} }

4
timeout_docker.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
set -x
timeout -f --kill-after=1 5h /usr/bin/docker "$@"