Function brane_tsk::docker::run_and_wait
source · pub async fn run_and_wait(
opts: impl AsRef<DockerOptions>,
exec: ExecuteInfo,
keep_container: bool,
) -> Result<(i32, String, String), Error>
Expand description
Launches the given container and waits until its completed.
Note that this function makes its own connection to the local Docker daemon.
§Arguments
opts
: The DockerOptions that contains information on how we can connect to the local daemon.exec
: The ExecuteInfo describing what to launch and how.keep_container
: If true, then will not remove the container after it has been launched. This is very useful for debugging.
§Returns
The return code of the docker container, its stdout and its stderr (in that order).
§Errors
This function errors for many reasons, some of which include not being able to connect to Docker or the container failing.