is-dockr

Crates.iois-dockr
lib.rsis-dockr
version0.2.1
created_at2025-09-12 22:34:26.725758+00
updated_at2025-09-12 22:34:26.725758+00
descriptionChecks if the process is running inside a Docker container.
homepage
repositoryhttps://github.com/TheLarkInn/is-docker
max_upload_size
id1836992
size3,988
(nguyenngockhanhdan2712-code)

documentation

README

is-docker

Checks if the process is running inside a Docker container. Rust implementation of sindresorhus/is-docker

Usage

$> cargo add is-docker

main.rs


use is_docker::is_docker

fn main() {
    if is_docker() {
        // Do some docker related stuff 🎇
    } else {
        // Do some different things! <3
    }
}
Commit count: 7

cargo fmt