Skip to content

Commit d950500

Browse files
committed
Allow hyphen in "id" (based on cwd pathname)
A directory with a hyphen currently generates an InvalidId error because of the regex in libcontainer. I don't believe there is any reason a hyphen should be disallowed. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
1 parent d05943b commit d950500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/factory_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const (
2626
)
2727

2828
var (
29-
idRegex = regexp.MustCompile(`^[\w_]+$`)
29+
idRegex = regexp.MustCompile(`^[\w_-]+$`)
3030
maxIdLen = 1024
3131
)
3232

0 commit comments

Comments
 (0)