|
@@ -3,7 +3,6 @@ package container
|
|
import (
|
|
import (
|
|
"errors"
|
|
"errors"
|
|
"fmt"
|
|
"fmt"
|
|
- "os"
|
|
|
|
"path/filepath"
|
|
"path/filepath"
|
|
|
|
|
|
"github.com/docker/swarmkit/api"
|
|
"github.com/docker/swarmkit/api"
|
|
@@ -25,9 +24,6 @@ func validateMounts(mounts []api.Mount) error {
|
|
if !filepath.IsAbs(mount.Source) {
|
|
if !filepath.IsAbs(mount.Source) {
|
|
return fmt.Errorf("invalid bind mount source, must be an absolute path: %s", mount.Source)
|
|
return fmt.Errorf("invalid bind mount source, must be an absolute path: %s", mount.Source)
|
|
}
|
|
}
|
|
- if _, err := os.Stat(mount.Source); os.IsNotExist(err) {
|
|
|
|
- return fmt.Errorf("invalid bind mount source, source path not found: %s", mount.Source)
|
|
|
|
- }
|
|
|
|
case api.MountTypeVolume:
|
|
case api.MountTypeVolume:
|
|
if filepath.IsAbs(mount.Source) {
|
|
if filepath.IsAbs(mount.Source) {
|
|
return fmt.Errorf("invalid volume mount source, must not be an absolute path: %s", mount.Source)
|
|
return fmt.Errorf("invalid volume mount source, must not be an absolute path: %s", mount.Source)
|