Create empty mountpoints (./rw and ./rootfs) every time we create or load a container
Upstream-commit: b6fb5bb21b73c90ae1833e32867781824f66ffb7 Component: engine
This commit is contained in:
@ -59,6 +59,9 @@ func createContainer(id string, root string, command string, args []string, laye
|
||||
stdoutLog: new(bytes.Buffer),
|
||||
stderrLog: new(bytes.Buffer),
|
||||
}
|
||||
if err := container.Filesystem.createMountPoints(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
container.stdout.AddWriter(NopWriteCloser(container.stdoutLog))
|
||||
container.stderr.AddWriter(NopWriteCloser(container.stderrLog))
|
||||
@ -89,6 +92,9 @@ func loadContainer(containerPath string) (*Container, error) {
|
||||
if err := json.Unmarshal(data, container); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := container.Filesystem.createMountPoints(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
container.State = newState()
|
||||
return container, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user