Fix docker-in-docker detection for cgroups v2 by br-rhrbacek · Pull Request #3535 · pre-commit/pre-commit

@br-rhrbacek mentioned this pull request

Sep 5, 2025

asottile

asottile

bidorffOL added a commit to bidorffOL/cap that referenced this pull request

Oct 13, 2025
It 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)

@br-rhrbacek @asottile

@asottile 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

Nov 8, 2025

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Nov 14, 2025