diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-05 15:21:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 15:21:37 +0200 |
commit | c313eec620becf710af925c02b7e5dfd80bd9ba6 (patch) | |
tree | 7ebf9d1878abb16ba3ce25f927abc82df4804d8b /pkg/specgen/generate/pod_create.go | |
parent | e1be837a4ff149e00ff6af9e71cf9ea625e33e6f (diff) | |
parent | 7ac3d906b5c080803f7898d3307af87bb57ad436 (diff) | |
download | podman-c313eec620becf710af925c02b7e5dfd80bd9ba6.tar.gz podman-c313eec620becf710af925c02b7e5dfd80bd9ba6.tar.bz2 podman-c313eec620becf710af925c02b7e5dfd80bd9ba6.zip |
Merge pull request #6079 from mheon/add_expose
Rework port parsing to support --expose and -P
Diffstat (limited to 'pkg/specgen/generate/pod_create.go')
-rw-r--r-- | pkg/specgen/generate/pod_create.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index babfba9bc..df5775f8b 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -83,7 +83,11 @@ func createPodOptions(p *specgen.PodSpecGenerator) ([]libpod.PodCreateOption, er options = append(options, libpod.WithPodUseImageHosts()) } if len(p.PortMappings) > 0 { - options = append(options, libpod.WithInfraContainerPorts(p.PortMappings)) + ports, _, _, err := parsePortMapping(p.PortMappings) + if err != nil { + return nil, err + } + options = append(options, libpod.WithInfraContainerPorts(ports)) } options = append(options, libpod.WithPodCgroups()) return options, nil |