fix: kill containers explicitly, make Podman behave like Docker #1371

Merged
mfenniak merged 1 commit from aahlenst/runner:sigkill-containers into main 2026-02-12 16:38:30 +00:00
Member

When Forgejo Runner is used with Podman, the "Complete job" step takes much longer than with Docker. The reason is that Podman and Docker behave differently when a container is removed that is still running. Podman tries to stop it first whereas Docker kills it outright. With this change, the container is killed explicitly before removing it. That aligns Podman's behaviour with Docker's. It makes the desired behaviour explicit, too.

  • bug fixes
    • PR: fix: kill containers explicitly, make Podman behave like Docker
When Forgejo Runner is used with Podman, the "Complete job" step takes much longer than with Docker. The reason is that Podman and Docker behave differently when a container is removed that is still running. Podman tries to stop it first whereas Docker kills it outright. With this change, the container is killed explicitly before removing it. That aligns Podman's behaviour with Docker's. It makes the desired behaviour explicit, too. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1371): <!--number 1371 --><!--line 0 --><!--description Zml4OiBraWxsIGNvbnRhaW5lcnMgZXhwbGljaXRseSwgbWFrZSBQb2RtYW4gYmVoYXZlIGxpa2UgRG9ja2Vy-->fix: kill containers explicitly, make Podman behave like Docker<!--description--> <!--end release-notes-assistant-->
fix: kill containers explicitly, make Podman behave like Docker
All checks were successful
checks / validate pre-commit-hooks file (pull_request) Successful in 35s
checks / Build Forgejo Runner (pull_request) Successful in 40s
checks / validate mocks (pull_request) Successful in 43s
checks / Build unsupported platforms (pull_request) Successful in 17s
checks / runner exec tests (pull_request) Successful in 26s
checks / integration tests (docker-latest) (pull_request) Successful in 9m13s
checks / integration tests (docker-stable) (pull_request) Successful in 11m1s
issue-labels / release-notes (pull_request_target) Successful in 3s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 6s
cascade / forgejo (pull_request_target) Successful in 1m11s
0409263545
mfenniak approved these changes 2026-02-12 16:03:00 +00:00
Contributor

cascading-pr updated at actions/setup-forgejo#883

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/883
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!1371
No description provided.