summaryrefslogtreecommitdiff
path: root/libpod/container_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_commit.go')
-rw-r--r--libpod/container_commit.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go
index c1dd42942..87e5d511c 100644
--- a/libpod/container_commit.go
+++ b/libpod/container_commit.go
@@ -99,6 +99,11 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai
for _, p := range c.config.PortMappings {
importBuilder.SetPort(fmt.Sprintf("%d/%s", p.ContainerPort, p.Protocol))
}
+ for port, protocols := range c.config.ExposedPorts {
+ for _, protocol := range protocols {
+ importBuilder.SetPort(fmt.Sprintf("%d/%s", port, protocol))
+ }
+ }
// Labels
for k, v := range c.Labels() {
importBuilder.SetLabel(k, v)