Fix docker-in-docker detection for cgroups v2 by br-rhrbacek · Pull Request #3535 · pre-commit/pre-commit
bidorffOL added a commit to bidorffOL/cap that referenced this pull request
Oct 13, 2025It seems that using /proc/1/cgroup is now broken to detect docker. Other projects have been using /proc/1/mountinfo instead (see pre-commit/pre-commit#3535)
asottile
changed the title
Fix pre-commit unable to determine if it is in a container for Docker-in-Docker setups (pre-commit#3360)
Fix docker-in-docker detection for cgroups v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters