2015-05-20 17:53:53 -04:00
|
|
|
// +build experimental
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2015-05-21 13:57:59 -04:00
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
"github.com/docker/docker/runconfig"
|
2015-05-20 17:53:53 -04:00
|
|
|
"github.com/docker/docker/volume"
|
|
|
|
"github.com/docker/docker/volume/drivers"
|
|
|
|
)
|
|
|
|
|
|
|
|
func getVolumeDriver(name string) (volume.Driver, error) {
|
|
|
|
if name == "" {
|
|
|
|
name = volume.DefaultDriverName
|
|
|
|
}
|
|
|
|
return volumedrivers.Lookup(name)
|
|
|
|
}
|
2015-05-21 13:57:59 -04:00
|
|
|
|
|
|
|
func parseVolumeSource(spec string, config *runconfig.Config) (string, string, error) {
|
|
|
|
if !filepath.IsAbs(spec) {
|
|
|
|
return spec, "", nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return "", spec, nil
|
|
|
|
}
|