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>
Upstream-commit: 79cf8395277002011b7632e5a040d4f4a7a25d1f
Component: engine
This commit is contained in:
Lei Jitang
2014-08-26 15:51:22 +08:00
parent ea03464517
commit 8270e6cad2
+2 -1
View File
@@ -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
}
}