aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-07-09 13:04:29 -0400
committerhaircommander <pehunt@redhat.com>2018-07-13 09:05:03 -0400
commit1aad3fd96b61705243e8f6ae35f65946916aa8a5 (patch)
treef4dfc5822357e04f556fd64ab8128a36619f1f17 /pkg
parenta2dde5a50d21f8857a57d412a8a1c4c8f731a8d1 (diff)
downloadpodman-1aad3fd96b61705243e8f6ae35f65946916aa8a5.tar.gz
podman-1aad3fd96b61705243e8f6ae35f65946916aa8a5.tar.bz2
podman-1aad3fd96b61705243e8f6ae35f65946916aa8a5.zip
Podman pod create/rm commands with man page and tests.
Includes a very stripped down version of podman pod ps, just for testing Signed-off-by: haircommander <pehunt@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/createconfig.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 7dfb9588c..dbbf99325 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -318,6 +318,14 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime) ([]lib
logrus.Debugf("appending name %s", c.Name)
options = append(options, libpod.WithName(c.Name))
}
+ if c.Pod != "" {
+ logrus.Debugf("appending to pod %s", c.Pod)
+ pod, err := runtime.LookupPod(c.Pod)
+ if err != nil {
+ return nil, errors.Wrapf(err, "unable to add container to pod")
+ }
+ options = append(options, runtime.WithPod(pod))
+ }
if len(c.PortBindings) > 0 {
portBindings, err = c.CreatePortBindings()