Merge pull request #17213 from calavera/volume_driver_validate_name

Validate volume names for the local driver.
Upstream-commit: 8247eff8a807d88bb683251bdbb16de6a52f0402
Component: engine
This commit is contained in:
David Calavera
2015-10-21 11:48:54 -07:00
5 changed files with 85 additions and 5 deletions
+2 -3
View File
@@ -12,7 +12,6 @@ import (
"io/ioutil"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"sync"
@@ -59,8 +58,8 @@ import (
)
var (
validContainerNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
validContainerNamePattern = regexp.MustCompile(`^/?` + validContainerNameChars + `+$`)
validContainerNameChars = utils.RestrictedNameChars
validContainerNamePattern = utils.RestrictedNamePattern
errSystemNotSupported = errors.New("The Docker daemon is not supported on this platform.")
)