mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
Merge pull request #3841 from alexlarsson/separate-base-fs
Separate out graphdriver mount and container root
This commit is contained in:
12
runtime.go
12
runtime.go
@@ -132,12 +132,12 @@ func (runtime *Runtime) Register(container *Container) error {
|
||||
}
|
||||
|
||||
// Get the root filesystem from the driver
|
||||
rootfs, err := runtime.driver.Get(container.ID)
|
||||
basefs, err := runtime.driver.Get(container.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error getting container filesystem %s from driver %s: %s", container.ID, runtime.driver, err)
|
||||
}
|
||||
defer runtime.driver.Put(container.ID)
|
||||
container.rootfs = rootfs
|
||||
container.basefs = basefs
|
||||
|
||||
container.runtime = runtime
|
||||
|
||||
@@ -765,11 +765,11 @@ func (runtime *Runtime) Mount(container *Container) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error getting container %s from driver %s: %s", container.ID, runtime.driver, err)
|
||||
}
|
||||
if container.rootfs == "" {
|
||||
container.rootfs = dir
|
||||
} else if container.rootfs != dir {
|
||||
if container.basefs == "" {
|
||||
container.basefs = dir
|
||||
} else if container.basefs != dir {
|
||||
return fmt.Errorf("Error: driver %s is returning inconsistent paths for container %s ('%s' then '%s')",
|
||||
runtime.driver, container.ID, container.rootfs, dir)
|
||||
runtime.driver, container.ID, container.basefs, dir)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user