2015-05-20 17:53:53 -04:00
|
|
|
// +build !experimental
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2015-05-21 13:57:59 -04:00
|
|
|
"fmt"
|
|
|
|
"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(_ string) (volume.Driver, error) {
|
|
|
|
return volumedrivers.Lookup(volume.DefaultDriverName)
|
|
|
|
}
|
2015-05-21 13:57:59 -04:00
|
|
|
|
|
|
|
func parseVolumeSource(spec string, _ *runconfig.Config) (string, string, error) {
|
|
|
|
if !filepath.IsAbs(spec) {
|
|
|
|
return "", "", fmt.Errorf("cannot bind mount volume: %s volume paths must be absolute.", spec)
|
|
|
|
}
|
|
|
|
|
|
|
|
return "", spec, nil
|
|
|
|
}
|