diff --git a/api/client.go b/api/client.go index 10dd9406dc..07a3d25e5c 100644 --- a/api/client.go +++ b/api/client.go @@ -1452,6 +1452,11 @@ func (cli *DockerCli) CmdCommit(args ...string) error { return nil } + re := regexp.MustCompile("/{2}") + if re.MatchString(repository) { + return fmt.Errorf("Error: Bad image name. Please rename your image in the format /") + } + v := url.Values{} v.Set("container", name) v.Set("repo", repository)