|
@@ -2,7 +2,6 @@ package volume
|
|
|
|
|
|
import (
|
|
import (
|
|
"errors"
|
|
"errors"
|
|
- "fmt"
|
|
|
|
"path"
|
|
"path"
|
|
|
|
|
|
"github.com/docker/docker/api/types/mount"
|
|
"github.com/docker/docker/api/types/mount"
|
|
@@ -10,7 +9,7 @@ import (
|
|
|
|
|
|
var lcowSpecificValidators mountValidator = func(m *mount.Mount) error {
|
|
var lcowSpecificValidators mountValidator = func(m *mount.Mount) error {
|
|
if path.Clean(m.Target) == "/" {
|
|
if path.Clean(m.Target) == "/" {
|
|
- return fmt.Errorf("invalid specification: destination can't be '/'")
|
|
|
|
|
|
+ return ErrVolumeTargetIsRoot
|
|
}
|
|
}
|
|
if m.Type == mount.TypeNamedPipe {
|
|
if m.Type == mount.TypeNamedPipe {
|
|
return errors.New("Linux containers on Windows do not support named pipe mounts")
|
|
return errors.New("Linux containers on Windows do not support named pipe mounts")
|