From 4b2dc48d0bcde9d9dccb05f829019a52f3eddec7 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 24 Aug 2021 10:23:10 +0200 Subject: podman inspect show exposed ports 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 #10777 Signed-off-by: Paul Holzinger --- libpod/pod_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/pod_api.go') diff --git a/libpod/pod_api.go b/libpod/pod_api.go index 716eb2e5b..53fb9538f 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -616,7 +616,7 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) { infraConfig.Networks = append(infraConfig.Networks, p.config.InfraContainer.Networks...) } infraConfig.NetworkOptions = p.config.InfraContainer.NetworkOptions - infraConfig.PortBindings = makeInspectPortBindings(p.config.InfraContainer.PortBindings) + infraConfig.PortBindings = makeInspectPortBindings(p.config.InfraContainer.PortBindings, nil) } inspectData := define.InspectPodData{ -- cgit v1.2.3-54-g00ecf