Skip to main content

Module execution_cleanup

Module execution_cleanup 

Source
Expand description

$ --cleanup <uuid-or-session-name> (issue #224): remove the Docker containers of one execution and the snapshot images they were derived from.

For callers that remove containers themselves: start-command’s completion watcher removes a snapshot image only when it removes the container. Nothing here is forced, so Docker keeps any container that is still running and any image that something else still uses; those are reported as retained.

The containers are the current one and every earlier container of a --resume chain (sessionNameHistory). The images are the start-command-resume/* images named by the start-command.snapshot-image label of those containers, by the record, and by the -resume-N names of the chain, removed newest first.

Structs§

CleanupOutcome

Enums§

CleanupState
What happened to one Docker object.

Functions§

chain_images
Snapshot images implied by a <name>-resume-<N> chain, newest first.
cleanup_execution
Remove one execution’s containers, then its snapshot images.
is_snapshot_image
Whether image is a wrapper-owned start-command-resume/<name>:<N> image.
plan_execution_cleanup
The containers and images --cleanup <execution> would remove.