MCPcopy Create free account
hub / github.com/codename-co/stack / get_containers

Function get_containers

packages/app/src-tauri/src/docker.rs:19–29  ·  view source on GitHub ↗

Common function to list containers

(docker: &Docker)

Source from the content-addressed store, hash-verified

17
18// Common function to list containers
19async fn get_containers(docker: &Docker) -> Result<Vec<ContainerSummary>, String> {
20 let options = Some(ListContainersOptions::<String> {
21 all: true,
22 ..Default::default()
23 });
24
25 docker
26 .list_containers(options)
27 .await
28 .map_err(|e| e.to_string())
29}
30
31// Utility to extract projects from containers
32fn extract_projects(containers: &[ContainerSummary]) -> HashSet<String> {

Callers 3

list_stacksFunction · 0.85
list_containersFunction · 0.85
docker_eventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected