MCPcopy Create free account
hub / github.com/Nariod/RustPacker / is_running_in_container

Function is_running_in_container

src/compiler.rs:11–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9const BUILD_TARGET: &str = "x86_64-pc-windows-gnu";
10
11fn is_running_in_container() -> bool {
12 Path::new("/.dockerenv").exists()
13 || Path::new("/run/.containerenv").exists()
14 || env::var("CONTAINER").is_ok()
15}
16
17fn find_container_runtime() -> Option<&'static str> {
18 ["podman", "docker"].into_iter().find(|cmd| {

Callers 1

run_compilerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected