tox-docker icon indicating copy to clipboard operation
tox-docker copied to clipboard

Fix Docker gateway IP detection for newer Docker versions

Open fao89 opened this issue 3 months ago • 0 comments

Improve gateway IP detection in get_gateway_ip() to handle both legacy and newer Docker API formats:

  • Try legacy NetworkSettings.Gateway first for backwards compatibility
  • Fall back to Networks section for newer Docker versions
  • Iterate through all networks to find any available gateway
  • Maintain "0.0.0.0" fallback for cases where no gateway is found

This resolves issues where newer Docker versions store network information in a different structure than the legacy format.

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

fao89 avatar Nov 20 '25 13:11 fao89