gitee.com/bomy/docker.git@v1.13.1/volume/local/local_windows.go (about)

     1  // Package local provides the default implementation for volumes. It
     2  // is used to mount data volume containers and directories local to
     3  // the host server.
     4  package local
     5  
     6  import (
     7  	"fmt"
     8  	"path/filepath"
     9  	"strings"
    10  )
    11  
    12  type optsConfig struct{}
    13  
    14  var validOpts map[string]bool
    15  
    16  // scopedPath verifies that the path where the volume is located
    17  // is under Docker's root and the valid local paths.
    18  func (r *Root) scopedPath(realPath string) bool {
    19  	if strings.HasPrefix(realPath, filepath.Join(r.scope, volumesPathName)) && realPath != filepath.Join(r.scope, volumesPathName) {
    20  		return true
    21  	}
    22  	return false
    23  }
    24  
    25  func setOpts(v *localVolume, opts map[string]string) error {
    26  	if len(opts) > 0 {
    27  		return fmt.Errorf("options are not supported on this platform")
    28  	}
    29  	return nil
    30  }
    31  
    32  func (v *localVolume) mount() error {
    33  	return nil
    34  }