mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
Wire networking into kpod create/run
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #109 Approved by: mheon
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/cri-o/ocicni/pkg/ocicni"
|
||||||
"github.com/docker/docker/daemon/caps"
|
"github.com/docker/docker/daemon/caps"
|
||||||
"github.com/docker/docker/pkg/mount"
|
"github.com/docker/docker/pkg/mount"
|
||||||
"github.com/docker/go-units"
|
"github.com/docker/go-units"
|
||||||
@ -529,6 +530,10 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er
|
|||||||
logrus.Debugf("appending name %s", c.Name)
|
logrus.Debugf("appending name %s", c.Name)
|
||||||
options = append(options, libpod.WithName(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
|
return options, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user