mirror of
https://github.com/docker/compose.git
synced 2026-10-12 02:13:08 +00:00
`docker compose port SERVICE PORT` picks the first matching publisher as its answer, but containerPublishers()'s sort.Slice does not guarantee tie order, so a dual-stack publish (same target port on both an IPv4 and an IPv6 address) could non-deterministically return either one. Switch to sort.SliceStable to preserve the daemon's original order for ties. Also drops a dead length check and a duplicated host:port formatter. Signed-off-by: Guillaume Lours <[email protected]>