diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-03-28 14:28:10 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-03-29 09:40:06 -0400 |
commit | 449b8ab7b14fcc0d9e3badbe14b09f387c2c459c (patch) | |
tree | 02e86e3d2a6219de8fd3d1e659ed9794454fc8ef /libpod | |
parent | 850326cc192444d1c5cfd8ba6e1015f653b41e73 (diff) | |
download | podman-449b8ab7b14fcc0d9e3badbe14b09f387c2c459c.tar.gz podman-449b8ab7b14fcc0d9e3badbe14b09f387c2c459c.tar.bz2 podman-449b8ab7b14fcc0d9e3badbe14b09f387c2c459c.zip |
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>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/options.go b/libpod/options.go index 3ca80e96c..14c21815f 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -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 |