2 unstable releases

Uses old Rust 2015

0.2.0 Jan 22, 2023
0.1.0 Jan 21, 2023

#1659 in Command line utilities

Download history 47709/week @ 2024-09-05 45007/week @ 2024-09-12 45149/week @ 2024-09-19 50558/week @ 2024-09-26 53936/week @ 2024-10-03 53754/week @ 2024-10-10 56307/week @ 2024-10-17 55049/week @ 2024-10-24 57985/week @ 2024-10-31 56374/week @ 2024-11-07 59522/week @ 2024-11-14 60706/week @ 2024-11-21 62947/week @ 2024-11-28 67121/week @ 2024-12-05 67757/week @ 2024-12-12 50452/week @ 2024-12-19

258,206 downloads per month
Used in 322 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