2015-05-20 17:53:53 -04:00
|
|
|
// +build !experimental
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2015-05-21 13:57:59 -04:00
|
|
|
"fmt"
|
|
|
|
"path/filepath"
|
|
|
|
|
2015-05-20 17:53:53 -04:00
|
|
|
"github.com/docker/docker/volume"
|
|
|
|
"github.com/docker/docker/volume/drivers"
|
|
|
|
)
|
|
|
|
|
|
|
|
func getVolumeDriver(_ string) (volume.Driver, error) {
|
|
|
|
return volumedrivers.Lookup(volume.DefaultDriverName)
|
|
|
|
}
|
2015-05-21 13:57:59 -04:00
|
|
|
|
2015-05-28 16:44:55 -04:00
|
|
|
func parseVolumeSource(spec string) (string, string, error) {
|
2015-05-21 13:57:59 -04:00
|
|
|
if !filepath.IsAbs(spec) {
|
|
|
|
return "", "", fmt.Errorf("cannot bind mount volume: %s volume paths must be absolute.", spec)
|
|
|
|
}
|
|
|
|
|
|
|
|
return "", spec, nil
|
|
|
|
}
|