From fcf52249b8f75b0f12d0e9c725efa3294739c772 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 7 Dec 2017 14:42:45 -0500 Subject: Wire networking into kpod create/run Signed-off-by: Matthew Heon Closes: #109 Approved by: mheon --- cmd/kpod/spec.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/kpod/spec.go') diff --git a/cmd/kpod/spec.go b/cmd/kpod/spec.go index 4e00f04ff..6929b571f 100644 --- a/cmd/kpod/spec.go +++ b/cmd/kpod/spec.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "strings" + "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/docker/daemon/caps" "github.com/docker/docker/pkg/mount" "github.com/docker/go-units" @@ -529,6 +530,10 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er logrus.Debugf("appending name %s", c.Name) options = append(options, libpod.WithName(c.Name)) } + // TODO parse ports into libpod format and include + if c.netMode.IsDefault() { + options = append(options, libpod.WithNetNS([]ocicni.PortMapping{})) + } return options, nil } -- cgit v1.2.3-54-g00ecf