summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-02 07:55:24 -0800
committerGitHub <noreply@github.com>2019-01-02 07:55:24 -0800
commite796f522f6b74a9fef16976709e773f6395ef5e2 (patch)
treee1cc86d17eeac682d3cedb41ba725978663acaa4 /libpod
parent7438b7bd3afb9e5a0fc761fdc8532cd697f2187b (diff)
parent9c7d5121364b25adfb35b5ac8f58bd949e0d12cb (diff)
downloadpodman-e796f522f6b74a9fef16976709e773f6395ef5e2.tar.gz
podman-e796f522f6b74a9fef16976709e773f6395ef5e2.tar.bz2
podman-e796f522f6b74a9fef16976709e773f6395ef5e2.zip
Merge pull request #2067 from mheon/fix_garbage_ports
Use sprintf to generate port numbers while committing
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_commit.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go
index dabd224d5..026611e51 100644
--- a/libpod/container_commit.go
+++ b/libpod/container_commit.go
@@ -2,6 +2,7 @@ package libpod
import (
"context"
+ "fmt"
"strings"
"github.com/containers/buildah"
@@ -101,7 +102,7 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai
}
// Expose ports
for _, p := range c.config.PortMappings {
- importBuilder.SetPort(string(p.ContainerPort))
+ importBuilder.SetPort(fmt.Sprintf("%d", p.ContainerPort))
}
// Labels
for k, v := range c.Labels() {