Expand description
Steps around the docker commit of a snapshot resume (issue #224):
--snapshot-prepare <command>runs in the stopped original before the commit:docker start,docker exec ... sh -c <command>, and always adocker killafterwards. Starting the original runs its own command again, so this is only for containers whose start is known to be safe.- Progress lines while
docker commitruns, which prints nothing itself. --remove-original-after <seconds>: remove the stopped original only if the replacement is still running after the delay.
Structs§
- Snapshot
Reporter - Where the snapshot steps report: the execution log and
notify.
Functions§
- commit_
with_ progress - Run
docker commitand report the elapsed time every interval. - format_
elapsed - Format a duration the way the progress lines print it: “45s”, “12 min”.
- progress_
interval_ seconds - remove_
original_ after - Remove the stopped original once the replacement has survived the delay. Returns the note describing what happened.
- run_
snapshot_ prepare - Run
--snapshot-preparein the stopped original. A failure is reported and the snapshot continues with the files as they are.