mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
This commit improves upon the PortMapper and PortAllocator classes by changing their internal data structures for port allocations to use a string rather than a single integer. This string holds the network interface address as well as the port number. This solves a previous problem where a port would be incorrectly reported as being in use because it had been allocated for a different interface. I've also added a basic test case for the PortMapper class, and extended the existing test case for PortAllocator. In the case of PortMapper, this is done by handing it a stub function for creating proxies rather than an actual implementation. Upstream-commit: 1cb1e08644b450d3371bfd7d6e305be454d19719 Component: engine