Skip to content

Conversation

@fao89
Copy link

@fao89 fao89 commented Nov 20, 2025

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]

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](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant