From d95050084baa71eb46bfeb3844cc3b806497f49c Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Thu, 25 Jun 2015 11:27:25 -0700 Subject: [PATCH] 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 (github: estesp) --- libcontainer/factory_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go index f6fb64b3..7942533b 100644 --- a/libcontainer/factory_linux.go +++ b/libcontainer/factory_linux.go @@ -26,7 +26,7 @@ const ( ) var ( - idRegex = regexp.MustCompile(`^[\w_]+$`) + idRegex = regexp.MustCompile(`^[\w_-]+$`) maxIdLen = 1024 )