Files
docker-cli/components/engine/integration-cli
Yong Tang 3229d5a2cb Fix issues of multiple published ports mapping to the same target port
This fix tries to address the issue raised in docker/docker-29730
where a service with multiple published ports mapping to the same target
port (e.g., `--publish 5000:80 --publish 5001:80`) can't be allocated.

The reason for the issue is that, `getPortConfigKey` is used for both
allocated ports and configured (may or may not be allocated) ports.
However, `getPortConfigKey` will not take into consideration the
`PublishedPort` field, which actually could be different for different
allocated ports.

This fix saves a map of `portKey:portNum:portState`,  instead of currently
used `portKey:portState` so that multiple published ports could be processed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cb59bd0c5194f3f74cd405a87b562465219cad8a
Component: engine
2017-01-10 00:46:18 -08:00
..
2017-01-03 12:47:25 -08:00