podman create/run need to load information from the image

We should be pulling information out of the image to set the
defaults to use when setting up the container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #110
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2017-12-18 12:05:06 -05:00
committed by Atomic Bot
parent 8aeb38e4a7
commit 00d38cb379
12 changed files with 553 additions and 205 deletions

View File

@ -25,14 +25,14 @@ type CtrCreateOption func(*Container) error
type ContainerFilter func(*Container) bool
// NewContainer creates a new container from a given OCI config
func (r *Runtime) NewContainer(spec *spec.Spec, options ...CtrCreateOption) (c *Container, err error) {
func (r *Runtime) NewContainer(rSpec *spec.Spec, options ...CtrCreateOption) (c *Container, err error) {
r.lock.Lock()
defer r.lock.Unlock()
if !r.valid {
return nil, ErrRuntimeStopped
}
ctr, err := newContainer(spec, r.lockDir)
ctr, err := newContainer(rSpec, r.lockDir)
if err != nil {
return nil, err
}