Browse Source

Merge pull request #11691 from matthewkmayer/feature-dont-create-bind-dirs

Removes bind dir creation in daemon start.
Arnaud Porterie 10 years ago
parent
commit
54a607a22d
1 changed files with 0 additions and 20 deletions
  1. 0 20
      daemon/start.go

+ 0 - 20
daemon/start.go

@@ -1,10 +1,6 @@
 package daemon
 
 import (
-	"fmt"
-	"os"
-	"strings"
-
 	"github.com/docker/docker/engine"
 	"github.com/docker/docker/runconfig"
 )
@@ -54,22 +50,6 @@ func (daemon *Daemon) setHostConfig(container *Container, hostConfig *runconfig.
 		return err
 	}
 
-	// FIXME: this should be handled by the volume subsystem
-	// Validate the HostConfig binds. Make sure that:
-	// the source exists
-	for _, bind := range hostConfig.Binds {
-		splitBind := strings.Split(bind, ":")
-		source := splitBind[0]
-
-		// ensure the source exists on the host
-		_, err := os.Stat(source)
-		if err != nil && os.IsNotExist(err) {
-			err = os.MkdirAll(source, 0755)
-			if err != nil {
-				return fmt.Errorf("Could not create local directory '%s' for bind mount: %v!", source, err)
-			}
-		}
-	}
 	// Register any links from the host config before starting the container
 	if err := daemon.RegisterLinks(container, hostConfig); err != nil {
 		return err