Skip to content

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

Merged
henrygd merged 5 commits into
henrygd:mainfrom
svenvg93:1991-multiple-docker-ip
Aug 15, 2026
Merged

henrygd merged 5 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
@henrygd
henrygd merged commit b68acea into henrygd:main Aug 15, 2026
1 check passed
@henrygd

henrygd commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Dank u, meneer

@svenvg93
svenvg93 deleted the 1991-multiple-docker-ip branch August 15, 2026 16:24
xiaoran7 pushed a commit to xiaoran7/beszel that referenced this pull request Oct 17, 2026
…e IPs (henrygd#1993)

* feat: support multiple docker ips

* deduplicate wildcard docker bindings

---------

Co-authored-by: henrygd <hank@henrygd.me>
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

2 participants