mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Create empty mountpoints (./rw and ./rootfs) every time we create or load a container
This commit is contained in:
parent
5d6dd22fb2
commit
b6fb5bb21b
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,9 @@ func createContainer(id string, root string, command string, args []string, laye
|
||||||
stdoutLog: new(bytes.Buffer),
|
stdoutLog: new(bytes.Buffer),
|
||||||
stderrLog: new(bytes.Buffer),
|
stderrLog: new(bytes.Buffer),
|
||||||
}
|
}
|
||||||
|
if err := container.Filesystem.createMountPoints(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
container.stdout.AddWriter(NopWriteCloser(container.stdoutLog))
|
container.stdout.AddWriter(NopWriteCloser(container.stdoutLog))
|
||||||
container.stderr.AddWriter(NopWriteCloser(container.stderrLog))
|
container.stderr.AddWriter(NopWriteCloser(container.stderrLog))
|
||||||
|
@ -89,6 +92,9 @@ func loadContainer(containerPath string) (*Container, error) {
|
||||||
if err := json.Unmarshal(data, container); err != nil {
|
if err := json.Unmarshal(data, container); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if err := container.Filesystem.createMountPoints(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
container.State = newState()
|
container.State = newState()
|
||||||
return container, nil
|
return container, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue