detect-container 1.0.0

Detect whether the current process is running inside a container (Docker, Podman, etc.).
Documentation
//! Run every detection check without short-circuiting and print which
//! ones match in the current environment. Useful inside dev containers,
//! CI runners, and odd Linux setups for understanding *why* the crate
//! returned what it did.
//!
//! Run with:
//!
//! ```text
//! cargo run --example report --features diagnostics
//! ```

fn main() {
    let report = detect_container::diagnostics::report();
    println!("is_container() = {}", report.is_container);
    println!();
    println!("{:<32}  {:<7}  description", "check", "matched");
    println!(
        "{:<32}  {:<7}  {}",
        "-".repeat(32),
        "-------",
        "-".repeat(40)
    );
    for c in &report.checks {
        println!(
            "{:<32}  {:<7}  {}",
            c.name,
            if c.matched { "yes" } else { "no" },
            c.description
        );
    }
}