Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Containers resolver): properly detect Docker runtime in containers (
puppetlabs#2781) Previously, the `Containers` resolver would always return a value from `read_environ`, preventing `read_cgroup` from being called. As a result, the `hypervisors` and `virtual` facts were often set incorrectly to `container_other` and displayed a misleading warning. Changes in this commit: - `read_cgroup` now returns early unless Docker or LXC matches are found. - `read_environ` returns `nil` when encountering an unsupported container. - If both methods return `nil`, `vm` defaults to `container_other` with a warning. These updates ensure that Facter correctly detects Docker and properly reports the `virtual` and `hypervisors` facts when running inside a Docker container.
- Loading branch information