mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
This commit is contained in:
parent
6bc773b2c1
commit
79cf839527
1 changed files with 2 additions and 1 deletions
|
@ -1101,7 +1101,8 @@ func (cli *DockerCli) CmdImport(args ...string) error {
|
||||||
|
|
||||||
if repository != "" {
|
if repository != "" {
|
||||||
//Check if the given image name can be resolved
|
//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
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue