mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix a bug which caused dockerd to crash at startup if a container didn't have a registered mountpoint
This commit is contained in:
parent
687d6f25ee
commit
2548722dae
1 changed files with 3 additions and 1 deletions
|
@ -1,9 +1,9 @@
|
||||||
package docker
|
package docker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/dotcloud/docker/fs"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"github.com/dotcloud/docker/fs"
|
||||||
"github.com/kr/pty"
|
"github.com/kr/pty"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
@ -129,6 +129,8 @@ func loadContainer(store *fs.Store, containerPath string, netManager *NetworkMan
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if mountpoint == nil {
|
||||||
|
return nil, errors.New("Couldn't load container: unregistered mountpoint.")
|
||||||
}
|
}
|
||||||
container := &Container{
|
container := &Container{
|
||||||
stdout: newWriteBroadcaster(),
|
stdout: newWriteBroadcaster(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue