is-container 0.1.2

Check if the process is running inside a container.
Documentation

is-container

Check if the process is running inside a container.

Lib

$ cargo add is-container
use is_container::is_container;

if is_container() {
    println!("Running inside a container");
}

CLI

$ cargo install is-container
$ is-container

# Exits with code 0 if inside a container and 2 if not.
$ echo $?
2