mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Alter container/pod/volume name regexp to match Docker
Docker's upstream name validation regex has two major differences from ours that we pick up in this PR. The first requires that the first character of a name is a letter or number, not a special character. The second allows periods in names. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
nameRegex = regexp.MustCompile("[a-zA-Z0-9_-]+")
|
||||
nameRegex = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
|
||||
)
|
||||
|
||||
// Runtime Creation Options
|
||||
|
Reference in New Issue
Block a user