mirror of
https://github.com/containers/podman.git
synced 2025-06-05 05:57:24 +08:00
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:

committed by
Atomic Bot

parent
8aeb38e4a7
commit
00d38cb379
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user