pub fn build_detached_docker_completion_script(
container_name: &str,
policy: DockerContainerCleanupPolicy,
log_path: Option<&PathBuf>,
execution_id: Option<&str>,
) -> StringExpand description
Build the shell the detached completion watcher runs after the container is gone.
Order matters. The post-mortem block and the removal note go in before the
footer, so the Finished:/Exit Code: pair stays the last thing in the log
(issue #171.2); the store is finalized after the footer, so a record only
becomes terminal once its log is complete (issue #170.1).
It only does any of that once the container has really exited: the return of
docker logs -f / docker wait is not proof of exit (issue #174). A
container that is somehow still running afterwards is never removed, gets no
Exit Code: footer and is never finalized — its record stays executing.