commit d379f7645026001ce57fd6421c819f6c7df77964
Author: Matthew Mayer <matthewkmayer@gmail.com>
Date: Mon Mar 23 22:13:06 2015 -0700
Removes unused imports.
Signed-off-by: Matthew Mayer <matthewkmayer@gmail.com>
commit 6e1f77c7f1566c8719087d88fbe06bade122691c
Author: Matthew Mayer <matthewkmayer@gmail.com>
Date: Mon Mar 23 20:41:16 2015 -0700
Removes bind dir creation in daemon start.
Signed-off-by: Matthew Mayer <matthewkmayer@gmail.com>
Signed-off-by: Matthew Mayer <matthewkmayer@gmail.com>
| ... | ... |
@@ -1,10 +1,6 @@ |
| 1 | 1 |
package daemon |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 |
- "fmt" |
|
| 5 |
- "os" |
|
| 6 |
- "strings" |
|
| 7 |
- |
|
| 8 | 4 |
"github.com/docker/docker/engine" |
| 9 | 5 |
"github.com/docker/docker/runconfig" |
| 10 | 6 |
) |
| ... | ... |
@@ -54,22 +50,6 @@ func (daemon *Daemon) setHostConfig(container *Container, hostConfig *runconfig. |
| 54 | 54 |
return err |
| 55 | 55 |
} |
| 56 | 56 |
|
| 57 |
- // FIXME: this should be handled by the volume subsystem |
|
| 58 |
- // Validate the HostConfig binds. Make sure that: |
|
| 59 |
- // the source exists |
|
| 60 |
- for _, bind := range hostConfig.Binds {
|
|
| 61 |
- splitBind := strings.Split(bind, ":") |
|
| 62 |
- source := splitBind[0] |
|
| 63 |
- |
|
| 64 |
- // ensure the source exists on the host |
|
| 65 |
- _, err := os.Stat(source) |
|
| 66 |
- if err != nil && os.IsNotExist(err) {
|
|
| 67 |
- err = os.MkdirAll(source, 0755) |
|
| 68 |
- if err != nil {
|
|
| 69 |
- return fmt.Errorf("Could not create local directory '%s' for bind mount: %v!", source, err)
|
|
| 70 |
- } |
|
| 71 |
- } |
|
| 72 |
- } |
|
| 73 | 57 |
// Register any links from the host config before starting the container |
| 74 | 58 |
if err := daemon.RegisterLinks(container, hostConfig); err != nil {
|
| 75 | 59 |
return err |