is-docker

Crates.iois-docker
lib.rsis-docker
version0.2.0
sourcesrc
created_at2023-01-21 20:14:33.676372
updated_at2023-01-22 20:19:07.012131
descriptionChecks if the process is running inside a Docker container.
homepage
repositoryhttps://github.com/TheLarkInn/is-docker
max_upload_size
id764584
size4,658
Sean Larkin (TheLarkInn)

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