Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 346 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 346 Bytes

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
    }
}