Detect Docker, Podman, Kubernetes, and LXC container environments in the Bazel hermetic-container integration hook.
Default Linux builds to native execution when already containerized, including Kubernetes pods with private cgroup namespaces, while preserving `MONGO_BAZEL_USE_HERMETIC_CONTAINER=1` as an explicit nested-container override.
Add regression tests and document the behavior.
Testing
Focused Python unittest selection: 28 passed.
Full integration-hook unittest suite: 188 passed; 3 cross-host tests are blocked by the workspace read-only `/data/bazel_cache` mount.
`git diff --check` passed.
`bazel run format` was attempted but blocked before analysis because the global Bazel configuration requires the read-only `/data/bazel_cache` output base.