feat: finish docker cli

Implement wanted functionality for docker subcommands.
This commit is contained in:
2023-05-23 21:48:29 +02:00
parent 9c34f6ff59
commit 907740fc5a
2 changed files with 10 additions and 6 deletions

View File

@@ -1,5 +1,9 @@
use super::DockerCommand;
use anyhow::Result;
pub fn stop_all() -> Result<()> {
todo!()
let running_containers = DockerCommand::docker().args("ps -q").stdout()?;
DockerCommand::docker()
.args(&format!("stop {running_containers}"))
.spawn_wait()
}