-
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 does not show EXPOSEd ports #10777
Comments
Interested in opening a PR for this? |
Actually yes! |
No if Docker displays this content then we should also. |
@mcheshkov just to reiterate since its been a while, the issue here is that podman does not show the same port information as docker right? I can open up a PR soon to fix this |
A friendly reminder that this issue had no activity for 30 days. |
@Luap99 PTAL and see if this is an issue, and fix if it is. |
@mcheshkov I am curious why do you need this? |
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]>
Thanks for the fix! And sorry for long silence. I don't know if this is intended usage for this feature or not, but we are running selenoid on top of podman, and selenoid uses this behavior to check if image really wants to export port, specified in selenoid config. One have to pass image and ports config as a JSON to selenoid. Port will end up in |
@mcheshkov I see, that makes sense. Thanks. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
For container with
EXPOSE
contents ofdocker inspect
andpodman inspect
differ in exposed ports while container is running: docker show exposed ports without mapping, podman does not show ports at allSteps to reproduce the issue:
podman inspect
Describe the results you received:
Empty object in field
NetworkSettings
->Ports
Describe the results you expected:
Object with key for every exposed port and
null
valueAdditional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No, I use Ubuntu 18.04 and podman 3.0.1 is most recent one in kubic repo
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: