mirror of https://github.com/docker/docs.git
make use of the "pullImage" parameter of node.Create method
Signed-off-by: mountkin <mountkin@gmail.com>
This commit is contained in:
parent
bc94c6c810
commit
e66a6b2793
|
|
@ -264,7 +264,7 @@ func (n *Node) Create(config *dockerclient.ContainerConfig, name string, pullIma
|
|||
|
||||
if id, err = client.CreateContainer(&newConfig, name); err != nil {
|
||||
// If the error is other than not found, abort immediately.
|
||||
if err != dockerclient.ErrNotFound {
|
||||
if err != dockerclient.ErrNotFound || !pullImage {
|
||||
return nil, err
|
||||
}
|
||||
// Otherwise, try to pull the image...
|
||||
|
|
|
|||
Loading…
Reference in New Issue