2 unstable releases

Uses old Rust 2015

0.2.0 Jan 22, 2023
0.1.0 Jan 21, 2023

#1646 in Command line utilities

Download history 39278/week @ 2024-07-22 40876/week @ 2024-07-29 40684/week @ 2024-08-05 43723/week @ 2024-08-12 44065/week @ 2024-08-19 41773/week @ 2024-08-26 46548/week @ 2024-09-02 44867/week @ 2024-09-09 44981/week @ 2024-09-16 48286/week @ 2024-09-23 52593/week @ 2024-09-30 53188/week @ 2024-10-07 55289/week @ 2024-10-14 54877/week @ 2024-10-21 57715/week @ 2024-10-28 54888/week @ 2024-11-04

227,558 downloads per month
Used in 300 crates (2 directly)

MIT license

3KB

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

Dependencies

~47KB