mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
dockerd: create /var/lib/docker if it doesn't exist
This commit is contained in:
parent
a7e9582a53
commit
5e2f0639c6
2 changed files with 4 additions and 1 deletions
|
@ -107,7 +107,7 @@ func NewFromDirectory(root string) (*Docker, error) {
|
|||
containers: list.New(),
|
||||
}
|
||||
|
||||
if err := os.Mkdir(docker.repository, 0700); err != nil && !os.IsExist(err) {
|
||||
if err := os.MkdirAll(docker.repository, 0700); err != nil && !os.IsExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ func New(root string) (*Store, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := os.MkdirAll(abspath, 0700); err != nil && !os.IsExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
layers, err := NewLayerStore(path.Join(root, "layers"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue