mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fixes #17734, clear message for host volumes not starting with /
Signed-off-by: Muayyad Alsadi <alsadi@gmail.com>
This commit is contained in:
parent
b1c96a73a3
commit
d3ae1d7bd6
1 changed files with 1 additions and 1 deletions
|
@ -269,7 +269,7 @@ func (r *Root) validateName(name string) error {
|
||||||
return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")}
|
return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")}
|
||||||
}
|
}
|
||||||
if !volumeNameRegex.MatchString(name) {
|
if !volumeNameRegex.MatchString(name) {
|
||||||
return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed", name, utils.RestrictedNameChars)}
|
return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed. If you intented to pass host directory use absolute path starting with /", name, utils.RestrictedNameChars)}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue