Crates.io | is-docker |
lib.rs | is-docker |
version | 0.2.0 |
source | src |
created_at | 2023-01-21 20:14:33.676372 |
updated_at | 2023-01-22 20:19:07.012131 |
description | Checks if the process is running inside a Docker container. |
homepage | |
repository | https://github.com/TheLarkInn/is-docker |
max_upload_size | |
id | 764584 |
size | 4,658 |
Checks if the process is running inside a Docker container. Rust implementation of sindresorhus/is-docker
$> 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
}
}