Skip to content

fix(agent): show all IP:port mappings for containers bound to multiple IPs#1993

Open
svenvg93 wants to merge 2 commits into
henrygd:mainfrom
svenvg93:1991-multiple-docker-ip
Open

fix(agent): show all IP:port mappings for containers bound to multiple IPs#1993
svenvg93 wants to merge 2 commits into
henrygd:mainfrom
svenvg93:1991-multiple-docker-ip

Conversation

@svenvg93
Copy link
Copy Markdown
Collaborator

📃 Description

Fix incorrect port display for Docker containers bound to multiple IP addresses. The agent was deduplicating ports by port number alone, so only the first IP:port binding was shown when the same port was exposed on more than one IP.

Fixes #1991

🪵 Changelog

✏️ Changed

  • convertContainerPortsToString now deduplicates by IP:port pair instead of port number alone
  • Port sorting uses a secondary sort by IP for stable output when multiple IPs share the same port

🔧 Fixed

  • Container ports bound to multiple IPs (e.g. 172.16.151.72:65533->80/tcp, 172.16.156.25:65533->80/tcp) now show all IP:port mappings instead of only the first one
  • Mixed IPv4/IPv6 bindings on the same port are now displayed correctly

@svenvg93 svenvg93 requested a review from henrygd as a code owner May 11, 2026 18:56
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.

[Bug]: Container ports display

1 participant