-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman inspect show exposed ports #11314
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@mheon PTAL |
// The map key is the port and the string slice contains the protocols, | ||
// e.g. tcp and udp | ||
// These are only set when exposed ports are given but not published. | ||
ExposedPorts map[uint16][]string `json:"exposedPorts,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably wire this into Commit, so the exposed ports are added to committed images. I'm actually kind of amazed this wasn't in before - had to double-check to make sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, they get commited now.
Podman inspect has to show exposed ports to match docker. This requires storing the exposed ports in the container config. A exposed port is shown as `"80/tcp": null` while a forwarded port is shown as `"80/tcp": [{"HostIp": "", "HostPort": "8080" }]`. Also make sure to add the exposed ports to the new image when the container is commited. Fixes containers#10777 Signed-off-by: Paul Holzinger <[email protected]>
LGTM |
Changes LGTM, but it looks like you may have a real test error. |
/lgtm |
Podman inspect has to show exposed ports to match docker. This requires
storing the exposed ports in the container config.
A exposed port is shown as
"80/tcp": null
while a forwarded port isshown as
"80/tcp": [{"HostIp": "", "HostPort": "8080" }]
.Fixes #10777