Skip to main content

Module container

Module container 

Source
Expand description

Container name resolution for Docker/Podman.

Resolves process PIDs to container names using:

  • Linux: /proc/{pid}/cgroup โ†’ container ID โ†’ docker ps lookup
  • macOS: docker ps with PID matching via docker inspect

All lookups are batched per refresh cycle to minimize CLI overhead. Missing Docker/Podman is handled gracefully (empty results, no errors).

Functionsยง

has_containers
Check if any entries have container names (used for adaptive column).
resolve_container_names
Resolve container names for a batch of PIDs.