From ed888d7eb5652efbbeede8e9427293bd09606d9b Mon Sep 17 00:00:00 2001 From: WangFengTu Date: Mon, 9 Mar 2020 04:12:58 -0400 Subject: [PATCH] Response image id but not digest when pull image iSulad does not support using image name's format 'name@digest' to run container currently, so response image id which iSulad support can avoid failure caused by passing name@digest to iSulad by user in some situation. Signed-off-by: WangFengTu --- cmd/isulad_img/image_pull.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/isulad_img/image_pull.go b/cmd/isulad_img/image_pull.go index cb7acf8..c998e90 100644 --- a/cmd/isulad_img/image_pull.go +++ b/cmd/isulad_img/image_pull.go @@ -117,10 +117,7 @@ func imagePull(gopts *globalOptions, popts *pullOptions, image string) (string, if err != nil { return "", err } - imageRef := status.ID - if len(status.RepoDigests) > 0 { - imageRef = status.RepoDigests[0] - } - fmt.Print(imageRef) - return imageRef, nil + + fmt.Print(status.ID) + return status.ID, nil } -- GitLab