summaryrefslogtreecommitdiff
path: root/daemon/names/names.go
blob: 22bba53d692efd47767efc495b715595f502763c (plain)
1
2
3
4
5
6
7
8
9
package names // import "github.com/docker/docker/daemon/names"

import "regexp"

// RestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names.
const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`

// RestrictedNamePattern is a regular expression to validate names against the collection of restricted characters.
var RestrictedNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`)