fix: make container.sweep opt-in (#1389)

Sweeping removed every container a job started through its Docker proxy, which silently tore down services that jobs deploy to the runner's own Docker daemon. Deploying from a runner on the target host is common, so `container.sweep` now defaults to `false` and CI-only runners can opt in with `container.sweep: true`.

Fixes https://gitea.com/gitea/runner/issues/1385

Reviewed-on: https://gitea.com/gitea/runner/pulls/1389
Reviewed-by: bircni <[email protected]>
Co-authored-by: silverwind <[email protected]>
This commit is contained in:
silverwind authored and bircni committed 2026-11-05 13:50:46 +00:00
1 parent 95ef17d022
commit bb6d793cb9
8 files changed
+9 -8

No files matched your search

+2 -2
View File
@@ -306,8 +306,8 @@ container:
# healthy. A negative value (e.g. -1s) starts the steps without waiting.
#service_ready_timeout: 5m
# Remove the containers, networks and volumes a job creates through its Docker proxy when
# the job ends. Set to false when jobs deploy services to the runner's Docker daemon.
#sweep: true
# the job ends. Leave off when jobs deploy services to the runner's Docker daemon.
#sweep: false
host:
# The parent directory of a job's working directory.