Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v4.9-rhel] Exposed ports are only included when not --net=host
Undoing some of my own work here from containers#24090 now that we have the ExposedPorts field implemented in inspect. I considered a revert of that patch, but it's still needed as without it we'd be including exposed ports when --net=container which is not correct. Basically, exposed ports for a container should always go in the new ExposedPorts field we added. They sometimes go in the Ports field in NetworkSettings, but only when the container is not net=host and not net=container. We were always including exposed ports, which was not correct, but is an easy logical fix. Also required is a test change to correct the expected behavior as we were testing for incorrect behavior. Fixes https://issues.redhat.com/browse/RHEL-60382 Signed-off-by: Matt Heon <[email protected]> (cherry picked from commit 8061553) Signed-off-by: tomsweeneyredhat <[email protected]>
- Loading branch information