1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

runconfig/opts: fix compilation issue

it was introduced with #20566 as a result of merge

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2016-03-21 15:01:08 -07:00
parent f9f8708dc6
commit 93f5770511

View file

@ -242,6 +242,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*container.Config, *container.Host
entrypoint = strslice.StrSlice{*flEntrypoint}
}
// Validate if the given hostname is RFC 1123 (https://tools.ietf.org/html/rfc1123) compliant.
hostname := *flHostname
if hostname != "" {
matched, _ := regexp.MatchString("^(([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])\\.)*([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])$", hostname)
if !matched {