Ensure container run commands clean up after success #26
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: glenux/docmachine-cli#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
DocMachine::Container::Run#run_commandcleans up containers even when the command exits successfully.Current behavior
Audit AUDIT-2025-015 shows
run_commandonly callscleanup_containerfrom exception handlers. Whenprocess.waitreturns status 0 and the user did not pass an explicit--keep-container, the method exits without touching the container. Containers linger on disk until a manualdocker rmorpodman rmoccurs.Desired behavior
process.wait, triggercleanup_containerwhenever the configuration indicates auto-clean (default) or when the container still exists.Technical notes
run_commandto share anensureblock or explicit helper that runs after the status check, without swallowing real errors.src/container/run.crand related specs to keep documentation consistent with the new lifecycle guarantees.Local task: 11aa05