فهرست منبع

Fix the bug of docker import command when import a image with a tag use format 'URL|- [REPOSITORY[:TAG]]'.Fixes #7714

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Lei Jitang 11 سال پیش
والد
کامیت
79cf839527
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      api/client/commands.go

+ 2 - 1
api/client/commands.go

@@ -1101,7 +1101,8 @@ func (cli *DockerCli) CmdImport(args ...string) error {
 
 	if repository != "" {
 		//Check if the given image name can be resolved
-		if _, _, err := registry.ResolveRepositoryName(repository); err != nil {
+		repo, _ := parsers.ParseRepositoryTag(repository)
+		if _, _, err := registry.ResolveRepositoryName(repo); err != nil {
 			return err
 		}
 	}