diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-07-13 13:57:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 13:57:04 -0400 |
commit | 827359c8e6b116b839a95460cc1775a11f84b682 (patch) | |
tree | 2c75493ec56ff9f882c766c56f128d933b0dab8b /pkg/spec/createconfig.go | |
parent | 35b7a875fd9747a6f322e12f358aeacea778eae5 (diff) | |
parent | a04a8d1dd4d375ebe5084bac760dc82f88cfc77f (diff) | |
download | podman-827359c8e6b116b839a95460cc1775a11f84b682.tar.gz podman-827359c8e6b116b839a95460cc1775a11f84b682.tar.bz2 podman-827359c8e6b116b839a95460cc1775a11f84b682.zip |
Merge pull request #1065 from haircommander/pod-start-create-rm
Podman pod create/rm/ps commands with man pages and tests
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r-- | pkg/spec/createconfig.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go index 7dfb9588c..57416732d 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("adding container 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 %s", c.Pod) + } + options = append(options, runtime.WithPod(pod)) + } if len(c.PortBindings) > 0 { portBindings, err = c.CreatePortBindings() |